2
Iは、多クラスサポートベクトルマシンのためのドキュメントに例を挙げて取り組んでいます - http://accord-framework.net/docs/html/T_Accord_MachineLearning_VectorMachines_MultilabelSupportVectorMachine.htmアコードとMulit-ラベルサポートベクターマシン
けれども、私は0、エラー率が届かない、とするときI値を計算しようとすると、出力値が得られません。この例に何か問題がありますか?
static void Main(string[] args)
{
// Sample input data
double[][] inputs =
{
new double[] { 0 },
new double[] { 1 },
new double[] { 2 },
new double[] { 3 },
};
// Outputs for each of the inputs
int[][] outputs =
{
new[] {1,-1,-1,-1},
new[] {-1,1,-1,-1},
new[] {-1,-1,1,-1},
new[] {-1,-1,-1,1},
};
// Create a new Linear kernel
IKernel kernel = new Linear();
// Create a new Multi-class Support Vector Machine with one input,
// using the linear kernel and for four disjoint classes.
var machine = new MultilabelSupportVectorMachine(1, kernel, 4);
// Create the Multi-label learning algorithm for the machine
var teacher = new MultilabelSupportVectorLearning(machine, inputs, outputs);
// Configure the learning algorithm to use SMO to train the
// underlying SVMs in each of the binary class subproblems.
teacher.Algorithm = (svm, classInputs, classOutputs, i, j) =>
new SequentialMinimalOptimization(svm, classInputs, classOutputs);
// Run the learning algorithm
double error = teacher.Run();
error = teacher.Run(); // 0.1875 error rate
var answer = machine.Compute(new double[] {2}); // gives -1,-1,-1,-1, instead of -1,-1,1,-1
エラー率はゼロであるべきであり、なぜ0
の入力のみが右出力を与えるように見えるのでしょうか?
だから、なぜ近くの投票?それは私のストーカーが証明するべきポイントを持っていますか? – user3791372
知識がなく、答えを知らない人々は、常に近くに投票するでしょう。あなたもそれを学ぶ:) – MonsterMMORPG