public DummyFeatures(DummyFeatures orig) : this(modshogunPINVOKE.new_DummyFeatures__SWIG_2(DummyFeatures.getCPtr(orig)), true) { if (modshogunPINVOKE.SWIGPendingException.Pending) { throw modshogunPINVOKE.SWIGPendingException.Retrieve(); } }
public static void Main() { modshogun.init_shogun_with_defaults(); double c = 23; DummyFeatures feats_train = new DummyFeatures(10); DummyFeatures feats_test = new DummyFeatures(17); ConstKernel kernel = new ConstKernel(feats_train, feats_train, c); double[,] km_train = kernel.get_kernel_matrix(); kernel.init(feats_train, feats_test); double[,] km_test = kernel.get_kernel_matrix(); // Parse and Display km_train Console.Write("km_train:\n"); int numRows = km_train.GetLength(0); int numCols = km_train.GetLength(1); for (int i = 0; i < numRows; i++) { for (int j = 0; j < numCols; j++) { Console.Write(km_train[i, j] + " "); } Console.Write("\n"); } // Parse and Display km_test Console.Write("\nkm_test:\n"); numRows = km_test.GetLength(0); numCols = km_test.GetLength(1); for (int i = 0; i < numRows; i++) { for (int j = 0; j < numCols; j++) { Console.Write(km_test[i, j] + " "); } Console.Write("\n"); } modshogun.exit_shogun(); }
static void Main(string[] argv) { modshogun.init_shogun_with_defaults(); double diag = 23; DummyFeatures feats_train = new DummyFeatures(10); DummyFeatures feats_test = new DummyFeatures(17); ConstKernel kernel = new ConstKernel(feats_train, feats_train, diag); DoubleMatrix km_train = kernel.get_kernel_matrix(); kernel.init(feats_train, feats_test); DoubleMatrix km_test =kernel.get_kernel_matrix(); Console.WriteLine(km_train.ToString()); Console.WriteLine(km_test.ToString()); modshogun.exit_shogun(); }
public static void Main() { modshogun.init_shogun_with_defaults(); double diag = 23; DummyFeatures feats_train = new DummyFeatures(10); DummyFeatures feats_test = new DummyFeatures(17); ConstKernel kernel = new ConstKernel(feats_train, feats_train, diag); double[,] km_train = kernel.get_kernel_matrix(); kernel.init(feats_train, feats_test); double[,] km_test=kernel.get_kernel_matrix(); // Parse and Display km_train Console.Write("km_train:\n"); int numRows = km_train.GetLength(0); int numCols = km_train.GetLength(1); for(int i = 0; i < numRows; i++){ for(int j = 0; j < numCols; j++){ Console.Write(km_train[i,j] +" "); } Console.Write("\n"); } // Parse and Display km_test Console.Write("\nkm_test:\n"); numRows = km_test.GetLength(0); numCols = km_test.GetLength(1); for(int i = 0; i < numRows; i++){ for(int j = 0; j < numCols; j++){ Console.Write(km_test[i,j] +" "); } Console.Write("\n"); } modshogun.exit_shogun(); }
internal static HandleRef getCPtr(DummyFeatures obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
public DummyFeatures(DummyFeatures orig) : this(modshogunPINVOKE.new_DummyFeatures__SWIG_2(DummyFeatures.getCPtr(orig)), true) { if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve(); }
internal static HandleRef getCPtr(DummyFeatures obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }