[scikit-learn] Fitting Lognormal Distribution

Startup Hire blrstartuphire at gmail.com
Fri Jun 3 06:02:24 EDT 2016


The above normal distribution is plotted by taking log of the values..

So, you mean to say I can take exp(values) and see whether the criteria is
satisfied after the meeting point.

Regards,
Sanant

On Fri, Jun 3, 2016 at 3:08 PM, Michael Eickenberg <
michael.eickenberg at gmail.com> wrote:

> probably, especially if they are normalised.
> you have the formulas for those, right? then you can say it for sure. just
> take the log on both sides. start by plotting the log of both of those
> distributions and you willprobably see already
>
>
> On Friday, June 3, 2016, Startup Hire <blrstartuphire at gmail.com> wrote:
>
>> Hi,
>>
>> Any one call help in above case?
>>
>> Regards,
>> Sanant
>>
>> On Mon, May 30, 2016 at 4:48 PM, Startup Hire <blrstartuphire at gmail.com>
>> wrote:
>>
>>> Thanks to all the replies.
>>>
>>> I was able to write the intial code
>>>
>>> - Refer the charts below.. After the second red point, can I say that
>>> the values of "BLUE" curve will always be higher than "GREEN" curve?
>>>
>>>    -  The ultimate objective is to find out when the values of blue
>>>    curve starts exceeding the values of green curve.
>>>
>>>
>>>
>>>
>>>
>>>  Regards, Sanant[image: Inline image 1]
>>>
>>> On Fri, May 27, 2016 at 10:29 PM, Jacob Schreiber <
>>> jmschreiber91 at gmail.com> wrote:
>>>
>>>> Another option is to use pomegranate
>>>> <https://github.com/jmschrei/pomegranate> which has probability
>>>> distribution fitting with the same API as scikit-learn. You can see a tutorials
>>>> here
>>>> <https://github.com/jmschrei/pomegranate/blob/master/tutorials/Tutorial_1_Distributions.ipynb> and
>>>> it includes LogNormalDistribution, in addition to a lot of others. All
>>>> distributions also have plotting methods.
>>>>
>>>> On Fri, May 27, 2016 at 6:53 AM, Warren Weckesser <
>>>> warren.weckesser at gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Fri, May 27, 2016 at 2:08 AM, Startup Hire <
>>>>> blrstartuphire at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> @ Warren: I was thinking of using federico method as its quite
>>>>>> simple. I know the mu and sigma of log(values) and I need to plot a normal
>>>>>> distribution based on that. Anything inaccurate in doing that?
>>>>>>
>>>>>>
>>>>>
>>>>> Getting mu and sigma from log(values) is fine.  That's one of the
>>>>> three methods (the one labeled "Explicit formula") that I included in this
>>>>> answer:
>>>>> http://stackoverflow.com/questions/15630647/fitting-lognormal-distribution-using-scipy-vs-matlab/15632937#15632937
>>>>>
>>>>> Warren
>>>>>
>>>>>
>>>>>
>>>>>> @ Sebastian: Thanks for your suggestion. I got to know more about
>>>>>> powerlaw distributions.  But, I dont think my values have a long tail. do
>>>>>> you think it is still relevant? What are the potential applications of the
>>>>>> same?
>>>>>>
>>>>>> Thanks & Regards,
>>>>>> Sanant
>>>>>>
>>>>>> On Thu, May 26, 2016 at 7:50 PM, Sebastian Benthall <
>>>>>> sbenthall at gmail.com> wrote:
>>>>>>
>>>>>>> You may also be interested in the 'powerlaw' Python package, which
>>>>>>> detects the tail cutoff.
>>>>>>> On May 26, 2016 5:46 AM, "Warren Weckesser" <
>>>>>>> warren.weckesser at gmail.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, May 26, 2016 at 2:08 AM, Startup Hire <
>>>>>>>> blrstartuphire at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> Hope you are doing good.
>>>>>>>>>
>>>>>>>>> I am working on a project where I need to do the following things:
>>>>>>>>>
>>>>>>>>> 1. I need to fit a lognormal distribution to a set of values [I
>>>>>>>>> know its lognormal by a simple XY scatter plot in excel]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> The probability distributions in scipy have a fit() method, and
>>>>>>>> scipy.stats.lognorm implements the log-normal distribution (
>>>>>>>> http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.lognorm.html)
>>>>>>>> so you can use scipy.lognorm.fit().  See, for example,
>>>>>>>> http://stackoverflow.com/questions/26406056/a-lognormal-distribution-in-python
>>>>>>>> or http://stackoverflow.com/
>>>>>>>>
>>>>>>>> /questions/15630647/fitting-lognormal-distribution-using-scipy-vs-matlab
>>>>>>>>
>>>>>>>> Warren
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> 2. I need to find the intersection of the lognormal distribution
>>>>>>>>> so that I can decide cut-off values based on that.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Can you guide me on (1) and (2) can be achieved in python?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Sanant
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> scikit-learn mailing list
>>>>>>>>> scikit-learn at python.org
>>>>>>>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> scikit-learn mailing list
>>>>>>>> scikit-learn at python.org
>>>>>>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> scikit-learn mailing list
>>>>>>> scikit-learn at python.org
>>>>>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> scikit-learn mailing list
>>>>>> scikit-learn at python.org
>>>>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> scikit-learn mailing list
>>>>> scikit-learn at python.org
>>>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> scikit-learn mailing list
>>>> scikit-learn at python.org
>>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>>
>>>>
>>>
>>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20160603/4d740ed1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Curve 1 and Curve 2.png
Type: image/png
Size: 23093 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20160603/4d740ed1/attachment-0001.png>


More information about the scikit-learn mailing list