Comments (2)
Maybe I missed this one but I store all the parameters returned after the distribution fitting.
As an example:
from distfit import distfit
X = np.random.normal(0, 2, 1000)
y = [-8, -6, 0, 1, 2, 3, 4, 5, 6]
dist = distfit(stats='ks', distr=['expon', 't', 'gamma', 'lognorm'])
results = dist.fit_transform(X)
print(dist.model)
{'distr': <scipy.stats._continuous_distns.t_gen at 0x2d4882810f0>,
'stats': 'ks',
'params': (3518324.248643998, -0.08180702912809554, 2.0838347069246876),
'name': 't',
'model': <scipy.stats._distn_infrastructure.rv_continuous_frozen at 0x2d49debda80>,
'score': 0.40237077133797083,
'loc': -0.08180702912809554,
'scale': 2.0838347069246876,
'arg': (3518324.248643998,),
'CII_min_alpha': -3.5094110072794593,
'CII_max_alpha': 3.345796949023267}
When I now do the fit manually for only the t-distribution, the following parameters are returned:
import scipy.stats as st
# fit dist to data
params = st.t.fit(X)
print(params)
(3518324.248643998, -0.08180702912809554, 2.0838347069246876)
# Separate parts of parameters
arg = params[:-2]
loc = params[-2]
scale = params[-1]
If I now compare the returned parameters and the stored ones in distfit, it is exactly the same:
params==dist.model['params']
True
from distfit.
I am closing this issue. Reopen if required.
from distfit.
Related Issues (20)
- new feature request - automatically fit multiple variables HOT 2
- plot_summary throws error HOT 2
- extend __init__.py descriptions HOT 3
- Help needed to interpret loc and scale HOT 2
- Boostrapping bug - The data contains non-finite values HOT 2
- Bug(?): lognorm distribution with negative loc parameter HOT 2
- Feature request: parallel execution when fitting multiple distributions HOT 3
- Quantile Bootstrap to avoid computationally expensive simple Bootstrap HOT 1
- plot freeze HOT 8
- Support Gaussian Mixture distribution fitting (2GMM, 3GMM..) HOT 1
- My code bog down on drawing pdf if best fit distribution is T distribution HOT 6
- More theoretical distributions can be added, such as zero truncated and zero modified theoretical distributions HOT 3
- Logo has a typo HOT 2
- Incorporate numba with scipy.special and numba-stats HOT 4
- module 'scipy.stats' has no attribute 'gilbrat' HOT 4
- Library decomposition HOT 1
- Error from scipy.optimize within fit_transform HOT 2
- Adjusting the bin size of plots HOT 1
- New methods to assess the goodness-of-fit HOT 1
- Integration with `sktime`, `skpro`? 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 distfit.