0

I am still confused with so many answers that are not comprehensive in how to prepare the data for the Libsvm in mat-lab and what is the exact requirements to finish training

I have the following data and I need to know what is the next step ( my data in excel now)

lable   words   total_char  domain len  Ratio   digit   dash    Jaccard  String 
-1         0       0             11     0.0000      0      0    0.3444  uvcaylkgdpg
-1         0       0              8     0.0000      0      0    0.2707  yqdqyntx
-1         1       2              10    0.2000      0      0    0.1761  vzcocljtfi
-1         0       0              8     0.0000      0      0    0.1919  wojpnhwk
-1         0       0              9     0.0000      0      0    0.3475  plrjgcjzf

 1         1       4             6      0.6667      0      0    0.4264  google
 1         4       14            8      1.7500      0      0    0.3444  facebook
 1         4       13            7      1.8571      0      0    0.2707  youtube
 1         1       3             5      0.6000      0      0    0.1761  yahoo
 1         1       3             5      0.6000      0      0    0.1919  baidu
 1         0       0             9      0.0000      0      0    0.3475  wikipedia

this is a portion of my data that i need to train the classifier

now i would know what is the next step in mat lab to do so I have done the following installing Libsvm and it is working fine I need to know how i can get the best result and the correct tuning in order to plot the results?

Aabualia
  • 61
  • 7

1 Answers1

1

The next part as you said is to train the classifier or create the model for future classification.That is to find the parameters for SVM model.You can use svmtrain in LIBSVM to train the model.

For example,

model = svmtrain(TrainLabel, TrainVec, '-c 1 -g 0.00154'); 

The parameters you need to decide is of c and gamma.

The step after that would be do prediction which you need to svmpredict.

Example:

[predict_label, accuracy, dec_values] = svmpredict(TestLabel, TestVec, model);

Hope it helps you to continue with your process.

Read the answer for this qn by me: Retraining after Cross Validation with libsvm

Community
  • 1
  • 1
lakshmen
  • 28,346
  • 66
  • 178
  • 276