Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
eec39b4d
Commit
eec39b4d
authored
May 22, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed incorrect requires clause on the cross_validate_trainer() and
cross_validate_trainer_threaded() routines.
parent
16d089d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
svm.h
dlib/svm/svm.h
+2
-2
svm_abstract.h
dlib/svm/svm_abstract.h
+2
-1
svm_threaded.h
dlib/svm/svm_threaded.h
+2
-2
svm_threaded_abstract.h
dlib/svm/svm_threaded_abstract.h
+2
-1
No files found.
dlib/svm/svm.h
View file @
eec39b4d
...
...
@@ -420,10 +420,10 @@ namespace dlib
// make sure requires clause is not broken
DLIB_ASSERT
(
is_binary_classification_problem
(
x
,
y
)
==
true
&&
1
<
folds
&&
folds
<=
x
.
nr
(
),
1
<
folds
&&
folds
<=
std
::
min
(
sum
(
y
>
0
),
sum
(
y
<
0
)
),
"
\t
matrix cross_validate_trainer()"
<<
"
\n\t
invalid inputs were given to this function"
<<
"
\n\t
x.nr(): "
<<
x
.
nr
()
<<
"
\n\t
std::min(sum(y>0),sum(y<0)): "
<<
std
::
min
(
sum
(
y
>
0
),
sum
(
y
<
0
))
<<
"
\n\t
folds: "
<<
folds
<<
"
\n\t
is_binary_classification_problem(x,y): "
<<
((
is_binary_classification_problem
(
x
,
y
))
?
"true"
:
"false"
)
);
...
...
dlib/svm/svm_abstract.h
View file @
eec39b4d
...
...
@@ -369,7 +369,8 @@ namespace dlib
/*!
requires
- is_binary_classification_problem(x,y) == true
- 1 < folds <= x.nr()
- 1 < folds <= std::min(sum(y>0),sum(y<0))
(e.g. There must be at least as many examples of each class as there are folds)
- trainer_type == some kind of binary classification trainer object (e.g. svm_nu_trainer)
ensures
- performs k-fold cross validation by using the given trainer to solve the
...
...
dlib/svm/svm_threaded.h
View file @
eec39b4d
...
...
@@ -94,11 +94,11 @@ namespace dlib
// make sure requires clause is not broken
DLIB_ASSERT
(
is_binary_classification_problem
(
x
,
y
)
==
true
&&
1
<
folds
&&
folds
<=
x
.
nr
(
)
&&
1
<
folds
&&
folds
<=
std
::
min
(
sum
(
y
>
0
),
sum
(
y
<
0
)
)
&&
num_threads
>
0
,
"
\t
matrix cross_validate_trainer()"
<<
"
\n\t
invalid inputs were given to this function"
<<
"
\n\t
x.nr(): "
<<
x
.
nr
()
<<
"
\n\t
std::min(sum(y>0),sum(y<0)): "
<<
std
::
min
(
sum
(
y
>
0
),
sum
(
y
<
0
))
<<
"
\n\t
folds: "
<<
folds
<<
"
\n\t
num_threads: "
<<
num_threads
<<
"
\n\t
is_binary_classification_problem(x,y): "
<<
((
is_binary_classification_problem
(
x
,
y
))
?
"true"
:
"false"
)
...
...
dlib/svm/svm_threaded_abstract.h
View file @
eec39b4d
...
...
@@ -28,7 +28,8 @@ namespace dlib
/*!
requires
- is_binary_classification_problem(x,y) == true
- 1 < folds <= x.nr()
- 1 < folds <= std::min(sum(y>0),sum(y<0))
(e.g. There must be at least as many examples of each class as there are folds)
- trainer_type == some kind of trainer object (e.g. svm_nu_trainer)
- num_threads > 0
ensures
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment