Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. IKernel kernel = new DynamicTimeWarping(dimension);
  2. var machine = new MulticlassSupportVectorMachine(0, kernel, 2);
  3. // Create the Multi-class learning algorithm for the machine
  4. var teacher = new MulticlassSupportVectorLearning(machine, inputs.ToArray(), outputs.ToArray());
  5. // Configure the learning algorithm to use SMO to train the
  6. // underlying SVMs in each of the binary class subproblems.
  7. teacher.Algorithm = (svm, classInputs, classOutputs, i, j) =>
  8. new SequentialMinimalOptimization(svm, classInputs, classOutputs)
  9. {
  10. Complexity = 1.5
  11. };
  12. // Run the learning algorithm
  13. double error = teacher.Run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement