public static void Main() {
	
	modshogun.init_shogun_with_defaults();
	int order = 3;
	int gap = 0;
	bool reverse = false;
	bool use_sign = false;

	String[] fm_train_dna = Load.load_dna("../data/fm_train_dna.dat");
	String[] fm_test_dna = Load.load_dna("../data/fm_test_dna.dat");

	StringCharFeatures charfeat = new StringCharFeatures(EAlphabet.DNA);
	charfeat.set_features(fm_train_dna);
	StringUlongFeatures feats_train = new StringUlongFeatures(charfeat.get_alphabet());
	feats_train.obtain_from_char(charfeat, order-1, order, gap, reverse);
	SortUlongString preproc = new SortUlongString();
	preproc.init(feats_train);
	feats_train.add_preprocessor(preproc);
	feats_train.apply_preprocessor();

	StringCharFeatures charfeat_test = new StringCharFeatures(EAlphabet.DNA);
	charfeat_test.set_features(fm_test_dna);
	StringUlongFeatures feats_test = new StringUlongFeatures(charfeat.get_alphabet());
	feats_test.obtain_from_char(charfeat_test, order-1, order, gap, reverse);
	feats_test.add_preprocessor(preproc);
	feats_test.apply_preprocessor();

	CommUlongStringKernel kernel = new CommUlongStringKernel(feats_train, feats_train, use_sign);

	double[,] km_train = kernel.get_kernel_matrix();
	kernel.init(feats_train, feats_test);
	double[,] km_test = kernel.get_kernel_matrix();
	modshogun.exit_shogun();

    }
	public static void Main() {
		modshogun.init_shogun_with_defaults();
		int order = 3;
		int gap = 0;
		bool reverse = false;
		bool use_sign = false;

		String[] fm_train_dna = Load.load_dna("../data/fm_train_dna.dat");
		String[] fm_test_dna = Load.load_dna("../data/fm_test_dna.dat");
		double[] fm_test_real = Load.load_labels("../data/fm_test_real.dat");

		StringCharFeatures charfeat = new StringCharFeatures(EAlphabet.DNA);
		charfeat.set_features(fm_train_dna);
		StringWordFeatures feats_train = new StringWordFeatures(charfeat.get_alphabet());
		feats_train.obtain_from_char(charfeat, order-1, order, gap, reverse);
		SortWordString preproc = new SortWordString();
		preproc.init(feats_train);
		feats_train.add_preprocessor(preproc);
		feats_train.apply_preprocessor();

		StringCharFeatures charfeat_test = new StringCharFeatures(EAlphabet.DNA);
		charfeat_test.set_features(fm_test_dna);
		StringWordFeatures feats_test = new StringWordFeatures(charfeat.get_alphabet());
		feats_test.obtain_from_char(charfeat_test, order-1, order, gap, reverse);
		feats_test.add_preprocessor(preproc);
		feats_test.apply_preprocessor();

		HammingWordDistance distance = new HammingWordDistance(feats_train, feats_train, use_sign);

		double[,] dm_train = distance.get_distance_matrix();
		distance.init(feats_train, feats_test);
		double[,] dm_test = distance.get_distance_matrix();
	}
    static void Main(string[] argv)
    {
        modshogun.init_shogun_with_defaults();
        int order = 3;
        int gap = 0;
        bool reverse = false;

        string[] fm_train_dna = Load.load_dna("../data/fm_train_dna.dat");
        string[] fm_test_dna = Load.load_dna("../data/fm_test_dna.dat");
        DoubleMatrix fm_test_real = Load.load_numbers("../data/fm_test_real.dat");

        StringCharFeatures charfeat = new StringCharFeatures(DNA);
        charfeat.set_features(fm_train_dna);
        StringWordFeatures feats_train = new StringWordFeatures(charfeat.get_alphabet());
        feats_train.obtain_from_char(charfeat, order-1, order, gap, reverse);
        SortWordString preproc = new SortWordString();
        preproc.init(feats_train);
        feats_train.add_preprocessor(preproc);
        feats_train.apply_preprocessor();

        StringCharFeatures charfeat_test = new StringCharFeatures(DNA);
        charfeat_test.set_features(fm_test_dna);
        StringWordFeatures feats_test = new StringWordFeatures(charfeat.get_alphabet());
        feats_test.obtain_from_char(charfeat_test, order-1, order, gap, reverse);
        feats_test.add_preprocessor(preproc);
        feats_test.apply_preprocessor();

        ManhattanWordDistance distance = new ManhattanWordDistance(feats_train, feats_train);

        DoubleMatrix dm_train = distance.get_distance_matrix();
        distance.init(feats_train, feats_test);
        DoubleMatrix dm_test = distance.get_distance_matrix();
        modshogun.exit_shogun();
    }
    public static void Main()
    {
        modshogun.init_shogun_with_defaults();
        int  order   = 3;
        int  gap     = 0;
        bool reverse = false;

        String[] fm_train_dna = Load.load_dna("../data/fm_train_dna.dat");
        String[] fm_test_dna  = Load.load_dna("../data/fm_test_dna.dat");
        double[,] fm_test_real = Load.load_numbers("../data/fm_test_real.dat");

        StringCharFeatures charfeat = new StringCharFeatures(EAlphabet.DNA);

        charfeat.set_features(fm_train_dna);
        StringWordFeatures feats_train = new StringWordFeatures(charfeat.get_alphabet());

        feats_train.obtain_from_char(charfeat, order - 1, order, gap, reverse);
        SortWordString preproc = new SortWordString();

        preproc.init(feats_train);
        feats_train.add_preprocessor(preproc);
        feats_train.apply_preprocessor();

        StringCharFeatures charfeat_test = new StringCharFeatures(EAlphabet.DNA);

        charfeat_test.set_features(fm_test_dna);
        StringWordFeatures feats_test = new StringWordFeatures(charfeat.get_alphabet());

        feats_test.obtain_from_char(charfeat_test, order - 1, order, gap, reverse);
        feats_test.add_preprocessor(preproc);
        feats_test.apply_preprocessor();

        ManhattanWordDistance distance = new ManhattanWordDistance(feats_train, feats_train);

        double[,] dm_train = distance.get_distance_matrix();
        distance.init(feats_train, feats_test);
        double[,] dm_test = distance.get_distance_matrix();

        foreach (double item in dm_train)
        {
            Console.Write(item);
        }

        foreach (double item in dm_test)
        {
            Console.Write(item);
        }

        modshogun.exit_shogun();
    }
    internal static ArrayList run(string[] strs)
    {
        modshogun.init_shogun_with_defaults();
        StringCharFeatures f = new StringCharFeatures(strs, DNA);
        f.obtain_by_sliding_window(5,1);

        f.set_features(strs);
        DynamicIntArray positions = new DynamicIntArray();
        positions.append_element(0);
        positions.append_element(6);
        positions.append_element(16);
        positions.append_element(25);

        //f.obtain_by_position_list(8,positions);

        ArrayList result = new ArrayList();
        result.Add(f);

        modshogun.exit_shogun();
        return result;
    }
    public static void Main()
    {
        modshogun.init_shogun_with_defaults();
        int  order    = 3;
        int  gap      = 0;
        bool reverse  = false;
        bool use_sign = false;

        String[] fm_train_dna = Load.load_dna("../data/fm_train_dna.dat");
        String[] fm_test_dna  = Load.load_dna("../data/fm_test_dna.dat");

        StringCharFeatures charfeat = new StringCharFeatures(EAlphabet.DNA);

        charfeat.set_features(fm_train_dna);
        StringUlongFeatures feats_train = new StringUlongFeatures(charfeat.get_alphabet());

        feats_train.obtain_from_char(charfeat, order - 1, order, gap, reverse);
        SortUlongString preproc = new SortUlongString();

        preproc.init(feats_train);
        feats_train.add_preprocessor(preproc);
        feats_train.apply_preprocessor();

        StringCharFeatures charfeat_test = new StringCharFeatures(EAlphabet.DNA);

        charfeat_test.set_features(fm_test_dna);
        StringUlongFeatures feats_test = new StringUlongFeatures(charfeat.get_alphabet());

        feats_test.obtain_from_char(charfeat_test, order - 1, order, gap, reverse);
        feats_test.add_preprocessor(preproc);
        feats_test.apply_preprocessor();

        CommUlongStringKernel kernel = new CommUlongStringKernel(feats_train, feats_train, use_sign);

        double[,] km_train = kernel.get_kernel_matrix();
        kernel.init(feats_train, feats_test);
        double[,] km_test = kernel.get_kernel_matrix();
        modshogun.exit_shogun();
    }
    static void Main(string[] argv)
    {
        modshogun.init_shogun_with_defaults();
        int num = 10;
        int order = 7;
        int gap = 0;
        bool reverse = false;

        string[] POS = new string[141];
        for (int i = 0; i < 60; i++)
        {
            POS[i] = repeat("ACGT", 10);
        }
        for (int i = 61; i < 82; i++)
        {
            POS[i] = repeat("TTGT", 10);
        }
        for (int i = 83; i < 141; i++)
        {
            POS[i] = repeat("ACGT", 10);
        }

        string[] NEG = new string[141];
        for (int i = 0; i < 60; i++)
        {
            NEG[i] = repeat("ACGT", 10);
        }
        for (int i = 61; i < 82; i++)
        {
            NEG[i] = repeat("TTGT", 10);
        }
        for (int i = 83; i < 141; i++)
        {
            NEG[i] = repeat("ACGT", 10);
        }

        string[] POSNEG = new string[282];
        for (int i = 0; i < 141; i++)
        {
            POSNEG[i] = POS[i];
            POSNEG[i + 141] = NEG[i];
        }

        for(int i = 0; i < 10; i++)
        {
            Alphabet alpha = new Alphabet(DNA);
            StringCharFeatures traindat = new StringCharFeatures(alpha);
            traindat.set_features(POSNEG);
            StringWordFeatures trainudat = new StringWordFeatures(traindat.get_alphabet());
            trainudat.obtain_from_char(traindat, order-1, order, gap, reverse);
            SortWordString pre = new SortWordString();
            pre.init(trainudat);
            trainudat.add_preprocessor(pre);
            trainudat.apply_preprocessor();
            CommWordStringKernel spec = new CommWordStringKernel(10, false);
            spec.set_normalizer(new IdentityKernelNormalizer());
            spec.init(trainudat, trainudat);
            DoubleMatrix K = spec.get_kernel_matrix();
        }

        modshogun.exit_shogun();
    }