Giter Site home page Giter Site logo

Two questions about distfit about distfit HOT 3 CLOSED

erdogant avatar erdogant commented on May 27, 2024
Two questions about distfit

from distfit.

Comments (3)

erdogant avatar erdogant commented on May 27, 2024

Dear lesshaste, Thank you for your feedback!
You are right about levy_l (and also stable), these are very slow so I removed them from the full list.
The loc parameter is automatically determined. There is no input parameter to force this to be a specified value.
Can you describe why you want to fixate this parameter?

try to pip install the new version and check the version. It should be 1.1.5.

pip install -U distfit
import distfit
print(distfit.__version__)

from distfit.

lesshaste avatar lesshaste commented on May 27, 2024

Thank you for the reply. In my case I know the distribution is symmetric with mean (and median) 0. So it makes sense to use that information I was thinking.

from distfit.

erdogant avatar erdogant commented on May 27, 2024

I you have sufficient data, your mean value will be towards zero. Maybe not exactly 0 but very close to it. If your data is symmetric, it will try to fit a distribution that shows the best fit. The fun part is that you do not have to worry about these parameters but are estimated for you.

For example a normal distribution with 10000 data points with mean ~0

X = np.random.normal(0, 2, 10000)

from distfit import distfit
dist = distfit()
model = dist.fit_transform(X)
dist.plot()

This gives the following output:

[distfit] >[norm ] [RSS: 0.0009400] [loc=0.017 scale=1.993]
[distfit] >[expon ] [RSS: 0.3300147] [loc=-8.140 scale=8.157]
[distfit] >[pareto ] [RSS: 0.3251750] [loc=-406937692.614 scale=406937684.474]
[distfit] >[dweibull ] [RSS: 0.0070768] [loc=0.011 scale=1.698]
[distfit] >[t ] [RSS: 0.0009299] [loc=0.017 scale=1.988]
[distfit] >[genextreme] [RSS: 0.0028985] [loc=-0.759 scale=1.961]
[distfit] >[gamma ] [RSS: 0.0008770] [loc=-85.198 scale=0.047]
[distfit] >[lognorm ] [RSS: 0.0009010] [loc=-74.206 scale=74.190]
[distfit] >[beta ] [RSS: 0.0008786] [loc=-82.021 scale=25037346.492]
[distfit] >[uniform ] [RSS: 0.2463460] [loc=-8.140 scale=16.556]

In case of a normal distribution the location (loc) keyword specifies the mean. The scale (scale) keyword specifies the standard deviation. But in different distribution these can have different properties. Mostly to shift and/or scale the distribution. So it may not be so straightforward to set these manually.

https://docs.scipy.org/doc/scipy/reference/stats.html

from distfit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.