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
adf0bc4f
Commit
adf0bc4f
authored
Apr 13, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarified examples
parent
6d7b0358
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
24 deletions
+36
-24
krr_classification_ex.cpp
examples/krr_classification_ex.cpp
+12
-8
rvm_ex.cpp
examples/rvm_ex.cpp
+12
-8
svm_ex.cpp
examples/svm_ex.cpp
+12
-8
No files found.
examples/krr_classification_ex.cpp
View file @
adf0bc4f
...
@@ -136,19 +136,19 @@ int main()
...
@@ -136,19 +136,19 @@ int main()
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
2
;
sample
(
1
)
=
2
;
cout
<<
"This
sample should be >= 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a +1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This
sample should be >= 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a +1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This
sample should be < 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a -1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
0
;
sample
(
1
)
=
0
;
cout
<<
"This
sample should be < 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a -1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
// We can also train a decision function that reports a well conditioned probability
// We can also train a decision function that reports a well conditioned probability
...
@@ -174,19 +174,23 @@ int main()
...
@@ -174,19 +174,23 @@ int main()
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
2
;
sample
(
1
)
=
2
;
cout
<<
"This +1 example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This +1 class example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This +1 example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This +1 class example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This -1 example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This -1 class example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
0
;
sample
(
1
)
=
0
;
cout
<<
"This -1 example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This -1 class example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
...
...
examples/rvm_ex.cpp
View file @
adf0bc4f
...
@@ -150,19 +150,19 @@ int main()
...
@@ -150,19 +150,19 @@ int main()
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
2
;
sample
(
1
)
=
2
;
cout
<<
"This
sample should be >= 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a +1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This
sample should be >= 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a +1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This
sample should be < 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a -1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
0
;
sample
(
1
)
=
0
;
cout
<<
"This
sample should be < 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a -1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
// We can also train a decision function that reports a well conditioned probability
// We can also train a decision function that reports a well conditioned probability
...
@@ -183,19 +183,23 @@ int main()
...
@@ -183,19 +183,23 @@ int main()
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
2
;
sample
(
1
)
=
2
;
cout
<<
"This +1 example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This +1 class example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This +1 example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This +1 class example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This -1 example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This -1 class example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
0
;
sample
(
1
)
=
0
;
cout
<<
"This -1 example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This -1 class example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
...
...
examples/svm_ex.cpp
View file @
adf0bc4f
...
@@ -154,19 +154,19 @@ int main()
...
@@ -154,19 +154,19 @@ int main()
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
2
;
sample
(
1
)
=
2
;
cout
<<
"This
sample should be >= 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a +1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This
sample should be >= 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a +1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This
sample should be < 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a -1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
0
;
sample
(
1
)
=
0
;
cout
<<
"This
sample should be < 0 and it is classified as a
"
<<
learned_function
(
sample
)
<<
endl
;
cout
<<
"This
is a -1 class example, the classifier output is
"
<<
learned_function
(
sample
)
<<
endl
;
// We can also train a decision function that reports a well conditioned probability
// We can also train a decision function that reports a well conditioned probability
...
@@ -187,19 +187,23 @@ int main()
...
@@ -187,19 +187,23 @@ int main()
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
2
;
sample
(
1
)
=
2
;
cout
<<
"This +1 example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This +1 class example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
3.123
;
sample
(
0
)
=
3.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This +1 example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This +1 class example should have high probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
9.3545
;
sample
(
1
)
=
9.3545
;
cout
<<
"This -1 example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This -1 class example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
sample
(
0
)
=
13.123
;
sample
(
0
)
=
13.123
;
sample
(
1
)
=
0
;
sample
(
1
)
=
0
;
cout
<<
"This -1 example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
endl
;
cout
<<
"This -1 class example should have low probability. Its probability is: "
<<
learned_pfunct
(
sample
)
<<
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