Commit 2ae7bd31 authored by Davis King's avatar Davis King

Simplified requires clause of train() function.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404022
parent 35fb8d4d
......@@ -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()
......
......@@ -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.
......
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