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
adf0bc4f
"tutorials/models/vscode:/vscode.git/clone" did not exist on "ebca7860f075a4590d0a61eb7a2d5c21687ab13f"
Commit
adf0bc4f
authored
Apr 12, 2013
by
Davis King
Browse files
clarified examples
parent
6d7b0358
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
24 deletions
+36
-24
examples/krr_classification_ex.cpp
examples/krr_classification_ex.cpp
+12
-8
examples/rvm_ex.cpp
examples/rvm_ex.cpp
+12
-8
examples/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