I've recently started playing SciKit ML. I just got my hands on classification algorithms (SGDClassifier, LinearSVC) and I'm not sure how to properly represent feature labels.
Suppose I'm trying to predict a football match outcome. Given N
features the result is either 1=WIN
or X=DRAW
or 2=LOSS
. Can/should I label my features using string values?
Eg.:
X_train = [[n0, n1, …, nn], …]
y_train = ['1', 'X', '2', …]
Or maybe I should use boolean matrices instead, like [win,draw,loss]
, eg:
y_train = [[1,0,0], [0,1,0], [0,0,1], …]
Or maybe I should use a single digit to map each label 1=win
and 0=draw
, -1=loss
, eg:
y_train = [1, 0, -1]
Which one would be best to pick and why? I'm a newbie, thank you for your patience.