@@ -0,0 +1,977 @@
+import org.shogun.*;%0Aimport org.jblas.*;%0Apublic class classifier_lda_modular %7B%0A%09static %7B%0A%09%09System.loadLibrary(%22Features%22);%0A%09%09System.loadLibrary(%22Classifier%22);%0A%09%7D%0A%0A%09public static void main(String argv%5B%5D) %7B%0A%09%09Features.init_shogun_with_defaults();%0A%09%09int gamma = 3;%0A%0A%09%09DoubleMatrix traindata_real = Load.load_numbers(%22../../data/toy/fm_train_real.dat%22);%0A%09%09DoubleMatrix testdata_real = Load.load_numbers(%22../../data/toy/fm_test_real.dat%22);%0A%0A%09%09DoubleMatrix trainlab = Load.load_labels(%22../../data/toy/label_train_twoclass.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%09Labels labels = new Labels(trainlab);%0A%0A%09%09LDA lda = new LDA(gamma, feats_train, labels);%0A%09%09lda.train();%0A%0A%09%09lda.get_bias();%0A%09%09lda.get_w();%0A%09%09lda.set_features(feats_test);%0A%09%09DoubleMatrix out_labels = lda.apply().get_labels();%0A%0A%09%09Features.exit_shogun();%0A%09%7D%0A%7D%0A

add example file classifier_lda_modular.java