Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ncd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
ncd
Commits
56ba532d
Commit
56ba532d
authored
Dec 10, 2023
by
ac_fx
Browse files
Options
Downloads
Patches
Plain Diff
od_rkhs -- per cluster log|x|/8
parent
1c8f8835
Loading
Loading
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/MATLAB/+CSF/od_rkhs.m
+3
-1
3 additions, 1 deletion
src/MATLAB/+CSF/od_rkhs.m
with
3 additions
and
1 deletion
src/MATLAB/+CSF/od_rkhs.m
+
3
−
1
View file @
56ba532d
% computes optimality deficiency for each xk in the rkhs
% od = Z(x) - z(x) + log|x|
% log2|x| / 8 to put cardinality into bytes
% maybe bytes is wrong? xk is in rkhs units, normalized and from ncd
function
dx
=
od_rkhs
(
xk
)
cx
=
repmat
(
mean
(
xk
),
size
(
xk
,
1
),
1
);
dx
=
vecnorm
(
cx
-
xk
,
2
,
2
)
+
log2
(
size
(
xk
,
1
));
dx
=
vecnorm
(
cx
-
xk
,
2
,
2
)
+
log2
(
size
(
xk
,
1
))
/
8
;
4
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment