当前位置: 首页>>代码示例>>C#>>正文


C# RealFeatures.get_feature_matrix方法代码示例

本文整理汇总了C#中RealFeatures.get_feature_matrix方法的典型用法代码示例。如果您正苦于以下问题:C# RealFeatures.get_feature_matrix方法的具体用法?C# RealFeatures.get_feature_matrix怎么用?C# RealFeatures.get_feature_matrix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RealFeatures的用法示例。


在下文中一共展示了RealFeatures.get_feature_matrix方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

    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();
    }
开发者ID:orico,项目名称:shogun,代码行数:31,代码来源:features_simple_modular.cs

示例2: Main

 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();
 }
开发者ID:orico,项目名称:shogun,代码行数:12,代码来源:MatrixTest.cs

示例3: Main

	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);
		}

	}
开发者ID:JackieXie168,项目名称:shogun,代码行数:13,代码来源:MatrixTest.cs

示例4: Main

	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);
		}

	}
开发者ID:JackieXie168,项目名称:shogun,代码行数:15,代码来源:features_dense_real_modular.cs


注:本文中的RealFeatures.get_feature_matrix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。