Simplified requires clause of train() function.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404022
This commit is contained in:
Davis King 2010-12-23 20:58:22 +00:00
parent 35fb8d4d03
commit 2ae7bd31f1
2 changed files with 3 additions and 4 deletions

View File

@ -693,7 +693,7 @@ namespace dlib
{
// make sure requires clause is not broken
DLIB_ASSERT(x.nr() > 1 && x.nr() == t.nr() && x.nc() == 1 && t.nc() == 1,
DLIB_ASSERT(is_learning_problem(x,t) && x.size() > 0,
"\tdecision_function rvm_regression_trainer::train(x,t)"
<< "\n\t invalid inputs were given to this function"
<< "\n\t x.nr(): " << x.nr()

View File

@ -223,9 +223,8 @@ namespace dlib
Also, x should contain sample_type objects.
- y == a matrix or something convertible to a matrix via vector_to_matrix().
Also, y should contain scalar_type objects.
- x.nr() > 1
- x.nr() == y.nr() && x.nc() == 1 && y.nc() == 1
(i.e. x and y are both column vectors of the same length)
- is_learning_problem(x,y) == true
- x.size() > 0
ensures
- trains a RVM given the training samples in x and
labels in y and returns the resulting decision_function.