本文整理汇总了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();
}
示例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();
}
示例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);
}
}
示例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);
}
}