[Java-ML-support] LibSVM.getWeights()
Status: Beta
Brought to you by:
thomasabeel
From: TT MD <how...@ya...> - 2012-01-06 16:47:53
|
Dear Sirs, I'm using Java-ml for my project which is a multi-class classification problem. I successfully trained my data using Linear (kernel_type = svm_parameter.LINEAR) LibSVM, but I want to get the weights for each class - which, as I understand, the parameters for my hypothesis. I used the method LibSVM.getWeights(). As I have 20 classes and 400 features, I expected to get a double array (double[]) of the size 400x20 = 8000, but only got 400 instead. I did many Google searches and get to know that LibSVM use one-against-one approach, but still I think there may be more weights than 400. So I don't quite sure if this is a mistake or not. May be LibSVM discribed "weights" something I haven't understood, or maybe what I received was only the weights for the 1st class, ... so I'm writing this and hope that someone could explain it to me, or give me some hints / links/ documents for the problem. I thank that someone in advance, and wish you all the best for the wonderful careers you are making. A beginner of machine learning. P.S: I also noticed the rawDecisionValues() method, but not quite had any idea what it means when you get a double array of these values. I read some papers on SVM, but can't tell what-is-what or which is which from the things in the papers and the things in the API. So if you please, enlight me about this too. Sorry for my smattering and the time it took you for reading this. |