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
407e9aff
Commit
407e9aff
authored
Dec 05, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified specs
parent
23ae0452
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
assignment_function_abstract.h
dlib/svm/assignment_function_abstract.h
+10
-7
svm_abstract.h
dlib/svm/svm_abstract.h
+2
-2
No files found.
dlib/svm/assignment_function_abstract.h
View file @
407e9aff
...
@@ -122,7 +122,7 @@ namespace dlib
...
@@ -122,7 +122,7 @@ namespace dlib
m() is allowed to indicate that l doesn't map to anything, and in this
m() is allowed to indicate that l doesn't map to anything, and in this
case it is excluded from the sum.
case it is excluded from the sum.
Finally,
match_score() must be
of the form:
Finally,
this object supports match_score() functions
of the form:
match_score(l,r) == dot(w, PSI(l,r))
match_score(l,r) == dot(w, PSI(l,r))
where l is an element of LHS, r is an element of RHS, w is a parameter
where l is an element of LHS, r is an element of RHS, w is a parameter
vector, and PSI() is defined by the feature_extractor template argument.
vector, and PSI() is defined by the feature_extractor template argument.
...
@@ -211,15 +211,15 @@ namespace dlib
...
@@ -211,15 +211,15 @@ namespace dlib
- When deciding how to match LHS to RHS, this object can operate in one of
- When deciding how to match LHS to RHS, this object can operate in one of
two modes. In the default mode, this object will indicate that there is
two modes. In the default mode, this object will indicate that there is
no match for an element of LHS if the best matching element of RHS would
no match for an element of LHS if the best matching element of RHS would
result in a negative match_score(). However, in the "forced assignment mode",
result in a negative match_score(). However, in the "forced assignment mode",
this object will always make the assignment if there is an available
this object will always make the assignment if there is an available
element in RHS regardless of the match_score().
element in RHS
,
regardless of the match_score().
Another way to understand this distinction is to consider an example.
Another way to understand this distinction is to consider an example.
Suppose LHS and RHS both
have 10 elements in them. Then in the default
Suppose LHS and RHS both
contain 10 elements. Then in the default mode,
mode, it is possible for this object to indicate that there are anywhere
it is possible for this object to indicate that there are anywhere between
from 0 to 10 matches between LHS and RHS. However, in forced assignment
0 to 10 matches between LHS and RHS. However, in forced assignment mode
mode
it will always indicate exactly 10 matches.
it will always indicate exactly 10 matches.
!*/
!*/
result_type
operator
()(
result_type
operator
()(
...
@@ -234,6 +234,9 @@ namespace dlib
...
@@ -234,6 +234,9 @@ namespace dlib
- lhs[i] is predicted to associate to rhs[ASSIGN[i]].
- lhs[i] is predicted to associate to rhs[ASSIGN[i]].
- else
- else
- lhs[i] doesn't associate with anything in rhs.
- lhs[i] doesn't associate with anything in rhs.
- All values in ASSIGN which are not equal to -1 are unique.
That is, ASSIGN will never indicate that more than one element
of lhs is assigned to a particular element of rhs.
!*/
!*/
result_type
operator
()
(
result_type
operator
()
(
...
...
dlib/svm/svm_abstract.h
View file @
407e9aff
...
@@ -99,8 +99,8 @@ namespace dlib
...
@@ -99,8 +99,8 @@ namespace dlib
- samples[i].first.size() == labels[i].size()
- samples[i].first.size() == labels[i].size()
- for all valid j:
- for all valid j:
-1 <= labels[i][j] < samples[i].second.size()
-1 <= labels[i][j] < samples[i].second.size()
(
a value of -1 indicates that samples[i].first[j] isn't associated with anything,
(
A value of -1 indicates that samples[i].first[j] isn't associated with anything.
a
ll other values indicate the associating element of samples[i].second)
A
ll other values indicate the associating element of samples[i].second)
- All elements of labels[i] which are not equal to -1 are unique. That is,
- All elements of labels[i] which are not equal to -1 are unique. That is,
multiple elements of samples[i].first can't associate to the same element
multiple elements of samples[i].first can't associate to the same element
in samples[i].second.
in samples[i].second.
...
...
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