Permalink
Browse files

fix larank example (always C=1 was used before)

  • Loading branch information...
sonney2k committed Apr 20, 2011
1 parent 76bf7f7 commit e9a7f862e96e2e77fd4f8216a6ceeea5ac380c5a
Showing with 2 additions and 3 deletions.
  1. +2 −3 examples/undocumented/python_modular/classifier_larank_modular.py
@@ -5,7 +5,7 @@
testdat = lm.load_numbers('../data/fm_test_real.dat')
label_traindat = lm.load_labels('../data/label_train_multiclass.dat')
parameter_list = [[traindat,testdat,label_traindat,0.9,1,6],[traindat,testdat,label_traindat,0.8,1,5]]
parameter_list = [[traindat,testdat,label_traindat,0.9,1,2000],[traindat,testdat,label_traindat,3,1,5000]]
def classifier_larank_modular (fm_train_real=traindat,fm_test_real=testdat,label_train_multiclass=label_traindat,C=0.9,num_threads=1,num_iter=5):
@@ -20,13 +20,12 @@ def classifier_larank_modular (fm_train_real=traindat,fm_test_real=testdat,label
width=2.1
kernel=GaussianKernel(feats_train, feats_train, width)
C=1
epsilon=1e-5
labels=Labels(label_train_multiclass)
svm=LaRank(C, kernel, labels)
#svm.set_tau(1e-3)
#svm.set_batch_mode(False)
svm.set_batch_mode(False)
#svm.io.enable_progress()
svm.set_epsilon(epsilon)
svm.train()

0 comments on commit e9a7f86

Please sign in to comment.