Comments (4)
Why not change DescriptiveStatistics.Median to:
public double Median
{
get { return _medianLazy.Value; }
}
readonly Lazy<double> _medianLazy;
And in constructor call:
_medianLazy = new Lazy<double>(() => data.Median());
This way Median is only calculated on first access to Median property and not in constructor. This would make DescriptiveStatistics much faster.
Or you remove Median from DescriptiveStatistics now. It is deprecated already.
from mathnet-numerics.
My plan so far is to remove Median on the next major release (together with all other deprecated code) when we can "officially" break compatibility according to semver.
Although the lazy approach would be a good idea in the meantime!
from mathnet-numerics.
I have send a pull request with the lazy approach. Then I think this issue can be closed.
from mathnet-numerics.
Thanks!
from mathnet-numerics.
Related Issues (20)
- How do I fit the gamma distribution, please? I didn't find it when I checked the documentation, am I missing something?
- Cholesky does not throw error on asymmetric matrix
- Power return NaN
- Adler32 checksum no work
- Using the Levenberg-Marquardt to solve a set of non-linear equations
- Beta distribution Sample method can return NaN HOT 1
- Is mono still required on Linux?
- Is it still impossible to read a 10 x 1 cell array of 3D arrays?
- Sparse MapIndexedInplace starts with incorrect indices
- Question: Building mathnet-numerics
- Marcum Q Function not implemented correctly. HOT 1
- Question: scipy splprep and splev
- DenseMatrix.OfRowArrays().LU() Memory Leak HOT 1
- I want use MKL under AOT publish,But cant HOT 2
- Polynomial fit returns infinity and NaN as parameters
- Incorrect condition for stopping the LevenbergMarquardtMinimizer's Minimum() by parameter tolerance. HOT 1
- Feature Request: Support for `ReadOnlyMemory<T>` and `ReadOnlySpan<T>` in Vector Creation HOT 2
- Modify NewtonMinimizer so that it forces Hessian to be positive definite HOT 1
- MKL_CBWR environment variable does not seem to be respected when running?
- Bug in SpecialFunctions.Hypotenuse HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathnet-numerics.