internal static ArrayList run(IList para) { bool reverse = false; modshogun.init_shogun_with_defaults(); int degree = (int)((int?)para[0]); 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 feats_train = new StringCharFeatures(fm_train_dna, DNA); StringCharFeatures feats_test = new StringCharFeatures(fm_test_dna, DNA); PolyMatchStringKernel kernel = new PolyMatchStringKernel(feats_train, feats_train, degree, true); DoubleMatrix km_train = kernel.get_kernel_matrix(); kernel.init(feats_train, feats_test); DoubleMatrix km_test =kernel.get_kernel_matrix(); ArrayList result = new ArrayList(); result.Add(km_train); result.Add(km_test); result.Add(kernel); modshogun.exit_shogun(); return result; }
public static void Main() { modshogun.init_shogun_with_defaults(); bool reverse = false; int degree = 3; 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 feats_train = new StringCharFeatures(fm_train_dna, EAlphabet.DNA); StringCharFeatures feats_test = new StringCharFeatures(fm_test_dna, EAlphabet.DNA); PolyMatchStringKernel kernel = new PolyMatchStringKernel(feats_train, feats_train, degree, true); double[,] km_train = kernel.get_kernel_matrix(); kernel.init(feats_train, feats_test); double[,] km_test=kernel.get_kernel_matrix(); }
public static void Main() { modshogun.init_shogun_with_defaults(); bool reverse = false; int degree = 3; 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 feats_train = new StringCharFeatures(fm_train_dna, EAlphabet.DNA); StringCharFeatures feats_test = new StringCharFeatures(fm_test_dna, EAlphabet.DNA); PolyMatchStringKernel kernel = new PolyMatchStringKernel(feats_train, feats_train, degree, true); double[,] km_train = kernel.get_kernel_matrix(); kernel.init(feats_train, feats_test); double[,] km_test = kernel.get_kernel_matrix(); }
internal static HandleRef getCPtr(PolyMatchStringKernel obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
internal static HandleRef getCPtr(PolyMatchStringKernel obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }