Added a call to cross_validate_regression_trainer()

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404064
This commit is contained in:
Davis King 2010-12-31 15:04:49 +00:00
parent 5e0a4ef304
commit df24f5a412
1 changed files with 8 additions and 0 deletions

View File

@ -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
}