@@ -0,0 +1,1060 @@
+import org.shogun.*;%0Aimport org.jblas.*;%0Apublic class classifier_libsvmoneclass_modular %7B%0A%09static %7B%0A%09%09System.loadLibrary(%22Features%22);%0A%09%09System.loadLibrary(%22Classifier%22);%0A%09%09System.loadLibrary(%22Kernel%22);%0A%09%7D%0A%0A%09public static void main(String argv%5B%5D) %7B%0A%09%09Features.init_shogun_with_defaults();%0A%09%09double width = 2.1;%0A%09%09double epsilon = 1e-5;%0A%09%09double C = 1.0;%0A%0A%09%09DoubleMatrix traindata_real = Load.load_numbers(%22../data/fm_train_real.dat%22);%0A%09%09DoubleMatrix testdata_real = Load.load_numbers(%22../data/fm_test_real.dat%22);%0A%0A%09%09RealFeatures feats_train = new RealFeatures();%0A%09%09feats_train.set_feature_matrix(traindata_real);%0A%09%09RealFeatures feats_test = new RealFeatures();%0A%09%09feats_test.set_feature_matrix(testdata_real);%0A%0A%09%09GaussianKernel kernel = new GaussianKernel(feats_train, feats_train, width);%0A%0A%09%09LibSVMOneClass svm = new LibSVMOneClass(C, kernel);%0A%09%09svm.set_epsilon(epsilon);%0A%09%09svm.train();%0A%09%09%0A%09%09kernel.init(feats_train, feats_test);%0A%09%09DoubleMatrix out_labels = svm.apply().get_labels();%0A%09%09System.out.println(out_labels.toString());%0A%0A%09%09Features.exit_shogun();%0A%09%7D%0A%7D%0A

add classifier_libsvmoneclass_modular example