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
298d3a4a
Commit
298d3a4a
authored
Jan 10, 2015
by
Davis King
Browse files
Fixed compute_lda_transform() so it works properly when the class covariance
matrices are singular even after performing PCA.
parent
c24c11f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
dlib/statistics/lda.h
dlib/statistics/lda.h
+1
-1
No files found.
dlib/statistics/lda.h
View file @
298d3a4a
...
@@ -120,7 +120,7 @@ namespace dlib
...
@@ -120,7 +120,7 @@ namespace dlib
matrix
<
T
,
0
,
1
>
W
;
matrix
<
T
,
0
,
1
>
W
;
svd3
(
Sw
,
A
,
W
,
H
);
svd3
(
Sw
,
A
,
W
,
H
);
W
=
sqrt
(
W
);
W
=
sqrt
(
W
);
W
=
reciprocal
(
round_zeros
(
W
,
max
(
W
)
*
1e-5
));
W
=
reciprocal
(
lowerbound
(
W
,
max
(
W
)
*
1e-5
));
A
=
trans
(
H
*
diagm
(
W
))
*
Sb
*
H
*
diagm
(
W
);
A
=
trans
(
H
*
diagm
(
W
))
*
Sb
*
H
*
diagm
(
W
);
matrix
<
T
>
v
,
s
,
u
;
matrix
<
T
>
v
,
s
,
u
;
svd3
(
A
,
v
,
s
,
u
);
svd3
(
A
,
v
,
s
,
u
);
...
...
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