Commit df24f5a4 authored by Davis King's avatar Davis King

Added a call to cross_validate_regression_trainer()

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404064
parent 5e0a4ef3
......@@ -83,6 +83,14 @@ int main()
// The first column is the true value of the sinc function and the second
// column is the output from the SVR estimate.
// We can also do 5-fold cross-validation and find the mean squared error. Note that
// we need to randomly shuffle the samples first. See the svm_ex.cpp for a discussion of
// why this is important.
randomize_samples(samples, targets);
cout << "MSE: "<< cross_validate_regression_trainer(trainer, samples, targets, 5) << endl;
// The output is:
// MSE: 1.65984e-05
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment