mirror of https://github.com/davisking/dlib.git
Updated same so it compiles with the current version of the krr_trainer.
This commit is contained in:
parent
ccfe3dc0fa
commit
5a5ec05153
|
@ -184,11 +184,12 @@ int main()
|
||||||
// tell the trainer the parameters we want to use
|
// tell the trainer the parameters we want to use
|
||||||
trainer.set_kernel(kernel_type(sigma));
|
trainer.set_kernel(kernel_type(sigma));
|
||||||
|
|
||||||
double loo_error;
|
std::vector<double> loo_values;
|
||||||
trainer.train(samples, labels, loo_error);
|
trainer.train(samples, labels, loo_values);
|
||||||
|
|
||||||
// Print sigma and the fraction of samples misclassified during LOO cross-validation.
|
// Print sigma and the fraction of samples correctly classified during LOO cross-validation.
|
||||||
cout << "sigma: " << sigma << " LOO error: " << loo_error << endl;
|
const double classification_accuracy = mean_sign_agreement(labels, loo_values);
|
||||||
|
cout << "sigma: " << sigma << " LOO accuracy: " << classification_accuracy << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue