|
@@ -274,7 +274,18 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
|
|
yMultiTrain = MatlabConversion::convertDoubleVectorToNice(prhs[3]);
|
|
yMultiTrain = MatlabConversion::convertDoubleVectorToNice(prhs[3]);
|
|
|
|
|
|
//----------------- train our classifier -------------
|
|
//----------------- train our classifier -------------
|
|
|
|
+ NICE::Timer t;
|
|
|
|
+ t.start();
|
|
|
|
+
|
|
classifier->train ( examplesTrain , yMultiTrain );
|
|
classifier->train ( examplesTrain , yMultiTrain );
|
|
|
|
+
|
|
|
|
+ t.stop();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ FILE * pFile;
|
|
|
|
+ pFile = fopen ("/home/freytag/experiments/gphik/2015-08-28-gphik-classif/training_times_gphik_raw.txt","a");
|
|
|
|
+ fprintf (pFile, "GPHIKRaw-Mex -- Time for training without data conversion: %f \n",t.getLast());
|
|
|
|
+ fclose (pFile);
|
|
|
|
|
|
//----------------- clean up -------------
|
|
//----------------- clean up -------------
|
|
for(int i=0;i<examplesTrain.size();i++)
|
|
for(int i=0;i<examplesTrain.size();i++)
|
|
@@ -303,8 +314,21 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
|
|
|
|
|
|
//----------------- classification -------------
|
|
//----------------- classification -------------
|
|
NICE::Vector results;
|
|
NICE::Vector results;
|
|
- NICE::Matrix scores;
|
|
|
|
|
|
+ NICE::Matrix scores;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ NICE::Timer t;
|
|
|
|
+ t.start();
|
|
|
|
+
|
|
classifier->classify ( examplesTest, results, scores );
|
|
classifier->classify ( examplesTest, results, scores );
|
|
|
|
+
|
|
|
|
+ t.stop();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ FILE * pFile;
|
|
|
|
+ pFile = fopen ("/home/freytag/experiments/gphik/2015-08-28-gphik-classif/test_times_gphik_raw_quant.txt","a");
|
|
|
|
+ fprintf (pFile, "GPHIKRaw-Mex-Quant test time %f \n",t.getLast());
|
|
|
|
+ fclose (pFile);
|
|
|
|
|
|
//----------------- clean up -------------
|
|
//----------------- clean up -------------
|
|
for ( std::vector< const NICE::SparseVector *>::iterator exIt = examplesTest.begin();
|
|
for ( std::vector< const NICE::SparseVector *>::iterator exIt = examplesTest.begin();
|
|
@@ -333,8 +357,22 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
|
|
//----------------- classification -------------
|
|
//----------------- classification -------------
|
|
uint result;
|
|
uint result;
|
|
NICE::SparseVector scores;
|
|
NICE::SparseVector scores;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ NICE::Timer t;
|
|
|
|
+ t.start();
|
|
|
|
+
|
|
|
|
+
|
|
classifier->classify ( example, result, scores );
|
|
classifier->classify ( example, result, scores );
|
|
|
|
|
|
|
|
+ t.stop();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ FILE * pFile;
|
|
|
|
+ pFile = fopen ("/home/freytag/experiments/gphik/2015-08-28-gphik-classif/test_times_gphik_raw_quant.txt","a");
|
|
|
|
+ fprintf (pFile, "GPHIKRaw-Mex-Quant test time %f \n",t.getLast());
|
|
|
|
+ fclose (pFile);
|
|
|
|
+
|
|
//----------------- clean up -------------
|
|
//----------------- clean up -------------
|
|
delete example;
|
|
delete example;
|
|
|
|
|