Я хочу объединить динамическую деформацию времени и svm для использования в качестве классификатора. Я использую Accord .net, но с моим кодом что-то не так, вот мой код:
double[][] inputs = new double[100][];
for(int i = 0; i < linesX.Length; i++)
{
inputs[i] = Array.ConvertAll(linesX[i].Split(','), Double.Parse);
}
int[] outputs = Array.ConvertAll(linesY, s => int.Parse(s));
// Create the Sequential Minimal Optimization learning algorithm
var smo = new MulticlassSupportVectorLearning<DynamicTimeWarping>()
{
// Set the parameters of the kernel
Kernel = new DynamicTimeWarping(alpha: 1, degree: 1)
};
// And use it to learn a machine!
var svm = smo.Learn(inputs, outputs);
// Now we can compute predicted values
int[] predicted = svm.Decide(inputs);
// And check how far we are from the expected values
double error = new ZeroOneLoss(outputs).Loss(predicted);
Мои входы (100 800), выходы (100,1), в этой строке будет исключение: var svm = smo.Learn(inputs, outputs);
Исключение “System.AggregateException” happens in Accord.MachineLearning.dll
Что не так с моим кодом