[SciPy-User] Weibull analysis ?

185 views
Skip to first unread message

David Trémouilles

unread,
Nov 26, 2010, 12:11:44 PM11/26/10
to SciPy Users List, Discussion of Numerical Python
Hello,

After careful Google searches, I was not successful in finding any
project dealing with Weibull analysis with neither python nor
numpy or scipy.
So before reinventing the wheel, I ask here whether any of you
have already started such a project and is eager to share.

Thanks,

David
_______________________________________________
SciPy-User mailing list
SciPy...@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user

Skipper Seabold

unread,
Nov 26, 2010, 7:29:41 PM11/26/10
to SciPy Users List
On Fri, Nov 26, 2010 at 12:11 PM, David Trémouilles
<david...@gmail.com> wrote:
> Hello,
>
>   After careful Google searches, I was not successful in finding any
> project dealing with Weibull analysis with neither python nor
> numpy or scipy.
> So before reinventing the wheel, I ask here whether any of you
> have already started such a project and is eager to share.
>

Not sure what you need, but I have some stub code in
scikits.statsmodels to fit a linear regression model with a Weibull
distribution. It wouldn't be too much work to cleanup if this is what
you're after.

If you just want to fit a parametric likelihood to some univariate
data you should be able to do this with scipy.stats. Josef or James
will know better the current state of this code but let us know if you
any problems

http://docs.scipy.org/scipy/docs/scipy-docs/tutorial/stats/continuous.rst/
http://docs.scipy.org/scipy/docs/scipy-docs/tutorial/stats.rst/#stats

Skipper

David Trémouilles

unread,
Nov 29, 2010, 12:53:42 PM11/29/10
to SciPy Users List
Thanks for this starting point Skipper !
What you mentioned is a small part of what I'm looking for.

Among other feature regarding Weibull analysis I'm interested in:
- Type 1 right censored data Maximum likelihood estimator
- Fisher matrix for confidence bound
- Likelihood ratio bound
- Parameter estimation of mixed weibull models
- ...

If somebody already coded such tool and is eager to share...

Regards,

David

Le 27/11/10 01:29, Skipper Seabold a écrit :

Skipper Seabold

unread,
Nov 30, 2010, 10:55:49 AM11/30/10
to SciPy Users List
On Mon, Nov 29, 2010 at 12:53 PM, David Trémouilles
<david...@gmail.com> wrote:
> Thanks for this starting point Skipper !
> What you mentioned is a small part of what I'm looking for.
>

I don't know of anything that can do these things in Python (that
doesn't mean anything though). A brief look through the following
references, I don't see anything that couldn't be accomplished with
scipy. You can look to the statsmodels scikit if you want some
structure. Please post your code, if you get any further on this.

References in-lined for my own edification.

> Among other feature regarding Weibull analysis I'm interested in:
>   - Type 1 right censored data Maximum likelihood estimator

http://www.weibull.com/LifeDataWeb/analysis_parameter_methods.htm#suspended_data

>   - Fisher matrix for confidence bound

http://www.weibull.com/LifeDataWeb/fisher_matrix_confidence_bounds.htm

>   - Likelihood ratio bound

http://www.weibull.com/LifeDataWeb/likelihood_ratio_confidence_bounds.htm

>   - Parameter estimation of mixed weibull models
>   - ...

http://www.weibull.com/LifeDataWeb/the_mixed_weibull_distribution.htm#parameters

josef...@gmail.com

unread,
Nov 30, 2010, 11:56:09 AM11/30/10
to SciPy Users List
On Tue, Nov 30, 2010 at 10:55 AM, Skipper Seabold <jsse...@gmail.com> wrote:
> On Mon, Nov 29, 2010 at 12:53 PM, David Trémouilles
> <david...@gmail.com> wrote:
>> Thanks for this starting point Skipper !
>> What you mentioned is a small part of what I'm looking for.
>>
>
> I don't know of anything that can do these things in Python (that
> doesn't mean anything though).  A brief look through the following
> references, I don't see anything that couldn't be accomplished with
> scipy.  You can look to the statsmodels scikit if you want some
> structure.  Please post your code, if you get any further on this.
>
> References in-lined for my own edification.
>
>> Among other feature regarding Weibull analysis I'm interested in:
>>   - Type 1 right censored data Maximum likelihood estimator
>
> http://www.weibull.com/LifeDataWeb/analysis_parameter_methods.htm#suspended_data
>
>>   - Fisher matrix for confidence bound
>
> http://www.weibull.com/LifeDataWeb/fisher_matrix_confidence_bounds.htm
>
>>   - Likelihood ratio bound
>
> http://www.weibull.com/LifeDataWeb/likelihood_ratio_confidence_bounds.htm
>
>>   - Parameter estimation of mixed weibull models
>>   - ...
>
> http://www.weibull.com/LifeDataWeb/the_mixed_weibull_distribution.htm#parameters

Thanks Skipper, nice references.

Per Brodtkorb still has the best code for this that I have seen
http://code.google.com/p/pywafo/

I haven't managed to work my way through profile likelihood yet. With
generic mle it should be 20 lines of code or less to get mle estimate
and parameter_covariance estimates. Estimating the lower bound in a 3
parameter weibull might have problems with mle. Per has Maximum
Product Spacings as alternative estimator. (I'm using generalized
method of moments with quantile matching as an alternative.)

I haven't seen anything on mixture modeling in Python other than
gaussian. If there are only a few mixtures, then mle should be able to
handle it without having to use an EM algorithm.

(generic survival/hazard/failure model estimation with censored or
binned data is on my plans for statsmodels, I just need to put the
pieces together.)

Josef

Reply all
Reply to author
Forward
0 new messages