Example #1
0
 public SNPFeatures(StringByteFeatures str) : this(modshogunPINVOKE.new_SNPFeatures__SWIG_1(StringByteFeatures.getCPtr(str)), true)
 {
     if (modshogunPINVOKE.SWIGPendingException.Pending)
     {
         throw modshogunPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #2
0
 public StringByteFeatures(StringByteFeatures orig) : this(modshogunPINVOKE.new_StringByteFeatures__SWIG_5(StringByteFeatures.getCPtr(orig)), true)
 {
     if (modshogunPINVOKE.SWIGPendingException.Pending)
     {
         throw modshogunPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #3
0
 public HashedWDFeatures(StringByteFeatures str, int start_order, int order, int from_order) : this(modshogunPINVOKE.new_HashedWDFeatures__SWIG_2(StringByteFeatures.getCPtr(str), start_order, order, from_order), true)
 {
     if (modshogunPINVOKE.SWIGPendingException.Pending)
     {
         throw modshogunPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #4
0
 public WDSVMOcas(double C, int d, int from_d, StringByteFeatures traindat, Labels trainlab) : this(modshogunPINVOKE.new_WDSVMOcas__SWIG_2(C, d, from_d, StringByteFeatures.getCPtr(traindat), Labels.getCPtr(trainlab)), true)
 {
     if (modshogunPINVOKE.SWIGPendingException.Pending)
     {
         throw modshogunPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #5
0
 public void set_features(StringByteFeatures feat)
 {
     modshogunPINVOKE.WDSVMOcas_set_features(swigCPtr, StringByteFeatures.getCPtr(feat));
     if (modshogunPINVOKE.SWIGPendingException.Pending)
     {
         throw modshogunPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #6
0
    public static void Main()
    {
        modshogun.init_shogun_with_defaults();
        string             filename = "../data/snps.dat";
        StringByteFeatures sf       = new StringByteFeatures(EAlphabet.SNP);

        sf.load_ascii_file(filename, false, EAlphabet.SNP, EAlphabet.SNP);
        SNPFeatures snps = new SNPFeatures(sf);
    }
Example #7
0
    public static void Main()
    {
        modshogun.init_shogun_with_defaults();
        string filename = "../data/snps.dat";
        StringByteFeatures sf = new StringByteFeatures(EAlphabet.SNP);
        sf.load_ascii_file(filename, false, EAlphabet.SNP, EAlphabet.SNP);
        SNPFeatures snps = new SNPFeatures(sf);

        modshogun.exit_shogun();
    }
Example #8
0
    public bool append_features(StringByteFeatures sf)
    {
        bool ret = modshogunPINVOKE.StringByteFeatures_append_features(swigCPtr, StringByteFeatures.getCPtr(sf));

        if (modshogunPINVOKE.SWIGPendingException.Pending)
        {
            throw modshogunPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
	public static void Main() {
		modshogun.init_shogun_with_defaults();
		int order = 3;
		int start_order = 1;
		int hash_bits = 2;

		int from_order = order;
		StringByteFeatures f = new StringByteFeatures(EAlphabet.RAWDNA);
		HashedWDFeatures y = new HashedWDFeatures(f,start_order,order,from_order,hash_bits);

	}
Example #10
0
    public StringByteFeatures get_features()
    {
        IntPtr             cPtr = modshogunPINVOKE.WDSVMOcas_get_features(swigCPtr);
        StringByteFeatures ret  = (cPtr == IntPtr.Zero) ? null : new StringByteFeatures(cPtr, false);

        if (modshogunPINVOKE.SWIGPendingException.Pending)
        {
            throw modshogunPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #11
0
    public static void Main()
    {
        modshogun.init_shogun_with_defaults();
        int order       = 3;
        int start_order = 1;
        int hash_bits   = 2;

        int from_order       = order;
        StringByteFeatures f = new StringByteFeatures(EAlphabet.RAWDNA);
        HashedWDFeatures   y = new HashedWDFeatures(f, start_order, order, from_order, hash_bits);
    }
Example #12
0
    public StringByteFeatures get_transposed()
    {
        IntPtr             cPtr = modshogunPINVOKE.StringByteFeatures_get_transposed(swigCPtr);
        StringByteFeatures ret  = (cPtr == IntPtr.Zero) ? null : new StringByteFeatures(cPtr, true);

        if (modshogunPINVOKE.SWIGPendingException.Pending)
        {
            throw modshogunPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #13
0
    internal static ArrayList run(string filename)
    {
        filename = fname;
        modshogun.init_shogun_with_defaults();
        StringByteFeatures sf = new StringByteFeatures(SNP);
        sf.load_ascii_file(fname, false, SNP, SNP);
        SNPFeatures snps = new SNPFeatures(sf);

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

        modshogun.exit_shogun();
        return result;
    }
    internal static ArrayList run(IList para)
    {
        bool reverse = false;
        modshogun.init_shogun_with_defaults();
        DoubleMatrix A = (DoubleMatrix)para[0];
        int order = (int)((int?)para[1]);
        int start_order = (int)((int?)para[2]);
        int hash_bits = (int)((int?)para[3]);

        int from_order = order;
        StringByteFeatures f = new StringByteFeatures(RAWDNA);
        //f.set_features(new DoubleMatrix(new double[][]{{0,1,2,3,0,1,2,3,3,2,2,1,1}}));

        HashedWDFeatures y = new HashedWDFeatures(f,start_order,order,from_order,hash_bits);
        //DoubleMatrix fm = y.get_feature_matrix();

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

        modshogun.exit_shogun();

        return result;
    }
Example #15
0
 public HashedWDFeatures(StringByteFeatures str, int start_order, int order, int from_order) : this(modshogunPINVOKE.new_HashedWDFeatures__SWIG_2(StringByteFeatures.getCPtr(str), start_order, order, from_order), true) {
   if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve();
 }
Example #16
0
 public StringByteFeatures(StringByteFeatures orig) : this(modshogunPINVOKE.new_StringByteFeatures__SWIG_5(StringByteFeatures.getCPtr(orig)), true) {
   if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve();
 }
Example #17
0
 public void set_features(StringByteFeatures feat) {
   modshogunPINVOKE.WDSVMOcas_set_features(swigCPtr, StringByteFeatures.getCPtr(feat));
   if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve();
 }
Example #18
0
 public WDSVMOcas(double C, int d, int from_d, StringByteFeatures traindat, Labels trainlab) : this(modshogunPINVOKE.new_WDSVMOcas__SWIG_2(C, d, from_d, StringByteFeatures.getCPtr(traindat), Labels.getCPtr(trainlab)), true) {
   if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve();
 }
Example #19
0
 public bool append_features(StringByteFeatures sf) {
   bool ret = modshogunPINVOKE.StringByteFeatures_append_features(swigCPtr, StringByteFeatures.getCPtr(sf));
   if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Example #20
0
 internal static HandleRef getCPtr(StringByteFeatures obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Example #21
0
 public SNPFeatures(StringByteFeatures str) : this(modshogunPINVOKE.new_SNPFeatures__SWIG_1(StringByteFeatures.getCPtr(str)), true) {
   if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve();
 }
Example #22
0
 internal static HandleRef getCPtr(StringByteFeatures obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }