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
5a5ec051
Commit
5a5ec051
authored
Sep 02, 2011
by
Davis King
Browse files
Updated same so it compiles with the current version of the krr_trainer.
parent
ccfe3dc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
examples/using_custom_kernels_ex.cpp
examples/using_custom_kernels_ex.cpp
+5
-4
No files found.
examples/using_custom_kernels_ex.cpp
View file @
5a5ec051
...
@@ -184,11 +184,12 @@ int main()
...
@@ -184,11 +184,12 @@ int main()
// tell the trainer the parameters we want to use
// tell the trainer the parameters we want to use
trainer
.
set_kernel
(
kernel_type
(
sigma
));
trainer
.
set_kernel
(
kernel_type
(
sigma
));
double
loo_
error
;
std
::
vector
<
double
>
loo_
values
;
trainer
.
train
(
samples
,
labels
,
loo_
error
);
trainer
.
train
(
samples
,
labels
,
loo_
values
);
// Print sigma and the fraction of samples misclassified during LOO cross-validation.
// Print sigma and the fraction of samples correctly classified during LOO cross-validation.
cout
<<
"sigma: "
<<
sigma
<<
" LOO error: "
<<
loo_error
<<
endl
;
const
double
classification_accuracy
=
mean_sign_agreement
(
labels
,
loo_values
);
cout
<<
"sigma: "
<<
sigma
<<
" LOO accuracy: "
<<
classification_accuracy
<<
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