|
@@ -51,7 +51,7 @@ int main (int argc, char **argv)
|
|
|
|
|
|
// read training set
|
|
|
vector< vector<double> > trainData;
|
|
|
- Vector y;
|
|
|
+ NICE::Vector y;
|
|
|
const LabeledSet *train = md["train"];
|
|
|
|
|
|
readData< vector< vector<double> >, vector<double> > ( conf, *train, trainData, y, ext );
|
|
@@ -69,13 +69,26 @@ int main (int argc, char **argv)
|
|
|
cerr << "Size of the training set: " << trainData.size() << endl;
|
|
|
|
|
|
double noise = 0.1;
|
|
|
+
|
|
|
+ Timer t;
|
|
|
|
|
|
+ std::cerr << " create FastMinKernel object with data" << std::endl;
|
|
|
+ t.start();
|
|
|
FastMinKernel *fmk = new FastMinKernel ( trainData, noise );
|
|
|
+ t.stop();
|
|
|
+ std::cerr << " time for setting up FMK object: " << t.getLast() << std::endl;
|
|
|
|
|
|
+ std::cerr << " Initialize FMKGPHyperparameterOptimization object " << std::endl;
|
|
|
+ t.start();
|
|
|
+ FMKGPHyperparameterOptimization hyper ( &conf, fmk, "FMKGPHyperparameterOptimization" );
|
|
|
+ t.stop();
|
|
|
+ std::cerr << " time for setting up FMKGP object: " << t.getLast() << std::endl;
|
|
|
|
|
|
- FMKGPHyperparameterOptimization hyper ( &conf, fmk );
|
|
|
-
|
|
|
+ std::cerr << " start optimization" << std::endl;
|
|
|
+ t.start();
|
|
|
hyper.optimize ( y );
|
|
|
+ t.stop();
|
|
|
+ std::cerr << " time for optimization: " << t.getLast() << std::endl;
|
|
|
|
|
|
|
|
|
// ------------------ TESTING
|
|
@@ -93,7 +106,6 @@ int main (int argc, char **argv)
|
|
|
#endif
|
|
|
//DEBUG END
|
|
|
|
|
|
- Timer t;
|
|
|
Matrix confusion ( y.Max()+1, yTest.Max() + 1, 0.0 );
|
|
|
for ( uint i = 0 ; i < testData.size(); i++ )
|
|
|
{
|