static void Main(string[] argv) { modshogun.init_shogun_with_defaults(); List<DoubleMatrix> result = new List<DoubleMatrix>(4); DoubleMatrix inputRealMatrix = Load.load_numbers("../data/fm_train_real.dat"); RealFeatures realFeatures = new RealFeatures(inputRealMatrix); DoubleMatrix outputRealMatrix = realFeatures.get_feature_matrix(); result.Add(inputRealMatrix); result.Add(outputRealMatrix); DoubleMatrix inputByteMatrix = Load.load_numbers("../data/fm_train_byte.dat"); ByteFeatures byteFeatures = new ByteFeatures(inputByteMatrix); DoubleMatrix outputByteMatrix = byteFeatures.get_feature_matrix(); result.Add(inputByteMatrix); result.Add(outputByteMatrix); DoubleMatrix inputLongMatrix = Load.load_numbers("../data/fm_train_byte.dat"); LongFeatures byteFeatures = new LongFeatures(inputLongMatrix); DoubleMatrix outputLongMatrix = longFeatures.get_feature_matrix(); result.Add(inputByteMatrix); result.Add(outputByteMatrix); Console.WriteLine(result); modshogun.exit_shogun(); }
static void Main(string[] argv) { modshogun.init_shogun(); Console.WriteLine("Test DoubleMatrix(jblas):"); RealFeatures x = new RealFeatures(); double[][] y = { new double[] { 1, 2 }, new double[] { 3, 4 }, new double[] { 5, 6 } }; DoubleMatrix A = new DoubleMatrix(y); x.set_feature_matrix(A); DoubleMatrix B = x.get_feature_matrix(); Console.WriteLine(B.ToString()); modshogun.exit_shogun(); }
public static void Main(string[] args) { modshogun.init_shogun_with_defaults(); RealFeatures x = new RealFeatures(); double[,] y = new double[2,3] {{1, 2, 3}, {4, 5, 6}}; x.set_feature_matrix(y); double [,] r = x.get_feature_matrix(); foreach (int item in r) { Console.WriteLine(item); } }
public static void Main() { modshogun.init_shogun_with_defaults(); double[,] matrix = new double[6, 3]{{1,2,3},{4,0,0},{0,0,0},{0,5,0},{0,0,6},{9,9,9}}; RealFeatures a = new RealFeatures(matrix); a.set_feature_vector(new double[] {1, 4, 0, 0, 0, 9}, 0); double[,] a_out = a.get_feature_matrix(); foreach(double item in a_out) { Console.Write("{0} ", item); } }
public static void Main(string[] args) { modshogun.init_shogun_with_defaults(); RealFeatures x = new RealFeatures(); double[,] y = new double[2, 3] { { 1, 2, 3 }, { 4, 5, 6 } }; x.set_feature_matrix(y); double [,] r = x.get_feature_matrix(); foreach (int item in r) { Console.WriteLine(item); } }
public static void Main() { modshogun.init_shogun_with_defaults(); double[,] matrix = new double[6, 3] { { 1, 2, 3 }, { 4, 0, 0 }, { 0, 0, 0 }, { 0, 5, 0 }, { 0, 0, 6 }, { 9, 9, 9 } }; RealFeatures a = new RealFeatures(matrix); a.set_feature_vector(new double[] { 1, 4, 0, 0, 0, 9 }, 0); double[,] a_out = a.get_feature_matrix(); foreach (double item in a_out) { Console.Write("{0} ", item); } }