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
d45a52ed
Commit
d45a52ed
authored
Dec 13, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
acb1cdf2
f1f9a018
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
assignment_learning_ex.cpp
examples/assignment_learning_ex.cpp
+4
-4
No files found.
examples/assignment_learning_ex.cpp
View file @
d45a52ed
...
...
@@ -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