Commit 9e644cbf authored by Davis King's avatar Davis King

Made the spec more clear.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403209
parent 8aa8a27f
...@@ -327,11 +327,8 @@ namespace dlib ...@@ -327,11 +327,8 @@ namespace dlib
given binary classification problem for the given number of folds. given binary classification problem for the given number of folds.
Each fold is tested using the output of the trainer and the average Each fold is tested using the output of the trainer and the average
classification accuracy from all folds is returned. classification accuracy from all folds is returned.
- The accuracy is returned in a row vector, let us call it R. Both - The average accuracy is computed by running test_binary_decision_function()
quantities in R are numbers between 0 and 1 which represent the fraction on each fold and its output is averaged and returned.
of examples correctly classified. R(0) is the fraction of +1 examples
correctly classified and R(1) is the fraction of -1 examples correctly
classified.
- The number of folds used is given by the folds argument. - The number of folds used is given by the folds argument.
throws throws
- any exceptions thrown by trainer.train() - any exceptions thrown by trainer.train()
...@@ -347,7 +344,7 @@ namespace dlib ...@@ -347,7 +344,7 @@ namespace dlib
> >
const matrix<typename dec_funct_type::scalar_type, 1, 2, typename dec_funct_type::mem_manager_type> const matrix<typename dec_funct_type::scalar_type, 1, 2, typename dec_funct_type::mem_manager_type>
test_binary_decision_function ( test_binary_decision_function (
const dec_funct_type& trainer, const dec_funct_type& dec_funct,
const in_sample_vector_type& x_test, const in_sample_vector_type& x_test,
const in_scalar_vector_type& y_test const in_scalar_vector_type& y_test
); );
...@@ -356,7 +353,9 @@ namespace dlib ...@@ -356,7 +353,9 @@ namespace dlib
- is_binary_classification_problem(x_test,y_test) == true - is_binary_classification_problem(x_test,y_test) == true
- dec_funct_type == some kind of decision function object (e.g. decision_function) - dec_funct_type == some kind of decision function object (e.g. decision_function)
ensures ensures
- tests the given decision function by calling on the x_test and y_test samples. - Tests the given decision function by calling it on the x_test and y_test samples.
The output of dec_funct is interpreted as a prediction for the +1 class
if its output is >= 0 and as a prediction for the -1 class otherwise.
- The test accuracy is returned in a row vector, let us call it R. Both - The test accuracy is returned in a row vector, let us call it R. Both
quantities in R are numbers between 0 and 1 which represent the fraction quantities in R are numbers between 0 and 1 which represent the fraction
of examples correctly classified. R(0) is the fraction of +1 examples of examples correctly classified. R(0) is the fraction of +1 examples
......
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