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
3bc36fe1
Commit
3bc36fe1
authored
Jun 04, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanup
parent
94067a76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
using_custom_kernels_ex.cpp
examples/using_custom_kernels_ex.cpp
+2
-2
No files found.
examples/using_custom_kernels_ex.cpp
View file @
3bc36fe1
...
...
@@ -100,7 +100,7 @@ void deserialize ( ukf_kernel<T>& item, std::istream& in )
// ----------------------------------------------------------------------------------------
/*
This next thing, the kernel_derivative specialization is
OPTIONAL
. You only need
This next thing, the kernel_derivative specialization is
optional
. You only need
to define it if you want to use the dlib::reduced2() or dlib::approximate_distance_function()
routines. If so, then you need to supply code for computing the derivative of your kernel as
shown below. Note also that you can only do this if your kernel operates on dlib::matrix
...
...
@@ -166,7 +166,7 @@ int main()
// A valid kernel must always give rise to kernel matrices which are symmetric
// and positive semidefinite (i.e. have nonnegative eigenvalues). This next
// bit of code makes a kernel matrix and checks if
this is true
.
// bit of code makes a kernel matrix and checks if
it has these properties
.
const
matrix
<
double
>
K
=
kernel_matrix
(
kernel_type
(
0.1
),
randomly_subsample
(
samples
,
500
));
cout
<<
"
\n
Is it symmetric? (this value should be 0): "
<<
min
(
abs
(
K
-
trans
(
K
)))
<<
endl
;
cout
<<
"Smallest eigenvalue (should be >= 0): "
<<
min
(
real_eigenvalues
(
K
))
<<
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