-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Multivariate T likelihood cost #58
Add Multivariate T likelihood cost #58
Conversation
…ery close in speed... But Newton way cooler.
…w simple tests. Can use the quick (and theoretically interesting/meaningfull) exponential map on SPD matrices instead.
…ivariate t distribution. Like the idea of using the geometric mean of two different simple estimators.
…int iteration as when using Newton iterations.
… njit (hopefully faster).
… functions for speed.
…mpy style, and got a 10-20x performance increase.
…te log likelihood at fixed parameters.
…teTCost, along with tests.
…h change detector algorithms.
…tching how the leave-one-out sample was handled by the scale matrix MLE algorithm.
…w which we refine the mv_t dof estimate using loo-iterative algorithm.
and added a relative tolerance criteria when estimating the MLE scale matrix.
…ed unused utility functions in the test file for MvTCost.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
==========================================
+ Coverage 98.53% 98.74% +0.21%
==========================================
Files 49 50 +1
Lines 1838 2159 +321
==========================================
+ Hits 1811 2132 +321
Misses 27 27 ☔ View full report in Codecov by Sentry. |
…pecial functions used by the multivariate T cost. Clarify that they're not valid approximations at too low argument values (close to zero).
…esired arguments are propageted correctly.
…to be of floating data type.
…ad to difficulty handling Exceptions raised within the parallel function.
…put parameter to MultivariateTCost after call to .fit()
I experienced a problem when testing this PR on another project using skchange now, and the issue was fixed when I upgraded |
…required for an unknown reason. And move tbb threading layer priority down, to avoid constant warning messages. Omp now checked for first.
…ting virtual environments.
This PR adds a new cost function to skchange, the robust cost
MultivariateTCost
.As the maximum likelihood estimator for the scale matrix of a multivariate student's T distribution is now known analytically we solve a fixed point iteration equation to find the MLE scale matrix on each interval, before evaluating the log likelihood of the sample at the computed MLE scale matrix estimate. However, using the capbilities of
Numba
, the performance is greatly improved as compared to a purelynumpy
andscipy
based implementation.Currently the column medians are used as a quick and robust estimator of the distribution mean.
The fatness of the tails in the T distribution is controlled by the degrees of freedom (
dof
), and when using this cost one can either specify a fixed degrees of freedom for the cost object, or estimate the degrees of freedom when fitting the cost to samples.References: