Emanuele Olivetti
2006-04-30
Since I've spent some time on this (I'm newbie in PyML), this tip can help someone else.
If you are trying to build a dataset from a numpy array and you need to use numeric labels (i.e. for regression), remember to add always 'patternID=...' to you labels constructor. Example:
* X is a numpy matrix (note that you always need a matrix, numpy 1D vector are not allowed!)
* Y is a numpy vector of label values, related to X
* build you dataset in this way:
L = datafunc.Labels(Y,numericLabels=True,patternID=range(len(Y)))
data = datafunc.SparseCDataSet(X = X)
data.attachLabels(Labels)
Now you can play with svm.SVR()...
Cheers,
Emanuele