Calling covariance(m) with a one-column column matrix #2965
PhilippFeO
started this conversation in
General
Replies: 1 comment 2 replies
-
Yeah there are asserts there that check this. They are only on in debug mode or if you explicitly turn them on though. Turning on all the asserts makes things slow though so they are off by default in release mode. But yeah it's a good idea to run your CI tests with all the asserts turned on. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure, whether this belongs here but since it is more a question about the behavior than a bug, I chose Discussions rather than Issues.
I wonder if the following behavior of
covariance(m)
is intended:yields:
The covariance itself is not defined for one random variable/measurement, so calculating it with a one-column column matrix doesn't make sense in the first place but wouldn't be a failed assertion better than a
-nan
output? Especially when there are already consistency checks indlib/dlib/matrix/matrix_utilities.h
Line 1885 in 51c7a35
Beta Was this translation helpful? Give feedback.
All reactions