Skip to content

Commit

Permalink
fix lua examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed May 24, 2012
1 parent 8b0279c commit d4a6596
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/undocumented/lua_modular/check.sh
Expand Up @@ -2,7 +2,7 @@

rm -f error.log

#export LUA_CPATH=../../../src/interfaces/lua_modular/?.so
export LUA_CPATH=../../../src/interfaces/lua_modular/?.so

for e in $(ls -1 *.lua | grep -v load.lua)
do
Expand Down
Expand Up @@ -12,7 +12,7 @@ function classifier_averaged_perceptron_modular (fm_train_real,fm_test_real,labe
feats_train=modshogun.RealFeatures(fm_train_real)
feats_test=modshogun.RealFeatures(fm_test_real)

labels=modshogun.Labels(label_train_twoclass)
labels=modshogun.BinaryLabels(label_train_twoclass)

perceptron=modshogun.AveragedPerceptron(feats_train, labels)
perceptron:set_learn_rate(learn_rate)
Expand Down
Expand Up @@ -57,7 +57,7 @@ feats_train=modshogun.RealFeatures(traindata_real)
feats_test=modshogun.RealFeatures(testdata_real)
kernel=modshogun.GaussianKernel(feats_train, feats_train, width)

labels=modshogun.Labels(trainlab)
labels=modshogun.BinaryLabels(trainlab)
svm=modshogun.LibSVM(C, kernel, labels)
svm:train()

Expand Down
Expand Up @@ -12,8 +12,8 @@ parameter_list = {{ground_truth,predicted}}

function evaluation_contingencytableevaluation_modular(ground_truth, predicted)

ground_truth_labels = modshogun.Labels(ground_truth)
predicted_labels = modshogun.Labels(predicted)
ground_truth_labels = modshogun.BinaryLabels(ground_truth)
predicted_labels = modshogun.BinaryLabels(predicted)

base_evaluator = modshogun.ContingencyTableEvaluation()
base_evaluator:evaluate(predicted_labels,ground_truth_labels)
Expand Down
Expand Up @@ -14,7 +14,7 @@ function regression_krr_modular (fm_train,fm_test,label_train,width,tau)

kernel=modshogun.GaussianKernel(feats_train, feats_train, width)

labels=modshogun.Labels(label_train)
labels=modshogun.RegressionLabels(label_train)

krr=modshogun.KernelRidgeRegression(tau, kernel, labels)
krr:train(feats_train)
Expand Down
Expand Up @@ -64,7 +64,7 @@ function serialization_complex_example(num, dist, dim, C, width)
feats=modshogun.RealFeatures(data)
kernel=modshogun.GaussianKernel(feats, feats, width)

labels=modshogun.Labels(lab)
labels=modshogun.MulticlassLabels(lab)

svm = modshogun.GMNPSVM(C, kernel, labels)

Expand Down

0 comments on commit d4a6596

Please sign in to comment.