Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
f1f9a018
Commit
f1f9a018
authored
Dec 11, 2011
by
Davis King
Browse files
Fixed some comments.
parent
3ecacdcc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/assignment_learning_ex.cpp
examples/assignment_learning_ex.cpp
+4
-4
No files found.
examples/assignment_learning_ex.cpp
View file @
f1f9a018
...
...
@@ -14,7 +14,7 @@
The assignment problem can be optimally solved using the well known Hungarian
algorithm. However, this algorithm requires the user to supply some function
which measure the "goodness" of an individual association. In many cases the
which measure
s
the "goodness" of an individual association. In many cases the
best way to measure this goodness isn't obvious and therefore machine learning
methods are used.
...
...
@@ -38,8 +38,8 @@ using namespace dlib;
In an association problem, we will talk about the "Left Hand Set" (LHS) and the
"Right Hand Set" (RHS). The task will be to learn to map all elements of LHS to
unique elements of RHS. If an element of LHS can't be mapped to a unique element of
RHS for
any
reason (e.g. LHS is bigger than RHS) then it can also be mapped to the
special -1 output indicating no mapping.
RHS for
some
reason (e.g. LHS is bigger than RHS) then it can also be mapped to the
special -1 output
,
indicating no mapping
to RHS
.
So the first step is to define the type of elements in each of these sets. In the
code below we will use column vectors in both LHS and RHS. However, in general,
...
...
@@ -181,7 +181,7 @@ int main()
cout
<<
"predicted labels: "
<<
trans
(
vector_to_matrix
(
predicted_assignments
))
<<
endl
;
}
// We can also
call
this tool to compute the percentage of assignments predicted correctly.
// We can also
use
this tool to compute the percentage of assignments predicted correctly.
cout
<<
"training accuracy: "
<<
test_assignment_function
(
assigner
,
samples
,
labels
)
<<
endl
;
...
...
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