Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # We have to set up the script then go.
- train=$1;
- test=$2;
- labels=$3;
- cat > test_file.sg << EOF
- % Straight outta examples/cmdline/classifier_knn.sg.
- print KNN
- set_distance EUCLIDEAN REAL
- set_features TRAIN $train
- set_labels TRAIN $labels
- new_classifier KNN
- train_classifier 4
- set_features TEST $test
- out.txt = classify
- EOF
- # Now run it and time it.
- export LD_LIBRARY_PATH=shogun
- time interfaces/cmdline_static/shogun test_file.sg
- #rm test_file.sg
Advertisement
Add Comment
Please, Sign In to add comment