Comments (3)
The above results are for ~10 repetitions of the smallest raw histogram item, see get_counts_from_lengths(). When this number is increased to 100, the results are essentially the same, also aic and bic for VonMisesMixture is higher, closer to that of VonMisesMixtureBinned. Due to much larger data, fitting with VonMisesMixture then takes ages to finish. Then for 300, the curves are virtually indistinguishable etc.
My conclusion: It is preferable to use VonMisesMixtureBinned, which is much faster, for the analysis, together with the basin-hopping solver (a few (~20) iterations seems to be sufficient) to avoid dependence on the initial guess.
from dist_mixtures.
VonMisesMixtureBinned with the original bin sizes from the raw data, is the "correct" approach given that the raw data are already binned. Since this is essentially fitting a histogram, I think, the parameter estimate is independent of the conversion to independent counts, but the inference still requires the sample size.
Did we normalize the sample size for VonsMisesMixtureBinned ?
statsmodels master now has a chisquare function, that tests that the deviation of the data from the estimated model has a minimal size. I was hoping this gives us better test results for the chisquare test, then the 0, 1 we get because of the larger sample size. (I'm going to look for it.)
I also ran the "fit_von_mises.py" script on top of my GenericLikelihood cleanup branch and it didn't change anything for this case.
Are we getting different results, parameters, with basinhopping than with just one set of starting values and bfgs
?
from dist_mixtures.
The VonsMisesMixtureBinned instance is created in analyses.fit_mixture.fit() - it uses the raw data, only the angles are transformed from [-90, 90[ to [-pi, pi[.
Mostly basinhopping and bfgs arrive to the same/very similar results. Only for some data/initial parameter values they differ - for example when bfgs fails with nans due to that integer overflow problem. With basinhopping, L-BFGS-B is used as the local minimizer, see examples/psets/solvers.py. In practice, it seems that a very few iterations of basinhopping is needed, to avoid "pathological" starting values.
from dist_mixtures.
Related Issues (14)
- normalize params HOT 5
- binning
- problem in vonmises cdf of scipy.stats HOT 1
- rvs method has some points outside (-pi,pi)
- gap in histogram for Estimated Distribution plot HOT 5
- Merge 'updates' branch HOT 3
- design: convert endog, exog to float ? HOT 1
- fix coding (excessive LFs in dist_mixtures/mixture_von_mises.py) HOT 5
- normalize in fit(), update tests
- normalize_params reorder components in params HOT 2
- differences between nm and bfgs solutions HOT 9
- Verify the kind of distribution HOT 14
- VonMisesMixtureBinned does not work with statsmodels from git HOT 6
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 dist_mixtures.