<jupyter_start><jupyter_text>AnalysisThis notebook will be useful on small data sets.<jupyter_code>import weibull
%matplotlib inline<jupyter_output>c:\program files (x86)\python36-32\lib\site-packages\statsmodels\compat\pandas.py:56: FutureWarning: The pandas.core.datetools module is deprecated and will be removed in a future version. Please use the pandas.tseries module instead.
  from pandas.core import datetools<jupyter_text>Create the failure times array and the analysis object.  When the analysis is initialized with data, it creates values for the shape parameter, $\beta$, and the scale parameter, $\eta$.<jupyter_code>failure_times = [
    10197.8, 3349.0, 15318.6, 710.7, 20683.2, 
    6976.5, 2590.7, 11351.7, 10177.0, 3738.4
]

analysis = weibull.Analysis(failure_times)
analysis.fit()

print(f'beta: {analysis.beta}\neta: {analysis.eta}')<jupyter_output>DEBUG:weibull.weibull:
       data   susp  rank  f_rank  med_rank  rev_rank
4     710.7  False     1       1  0.067308        10
7    2590.7  False     2       2  0.163462         9
2    3349.0  False     3       3  0.259615         8
10   3738.4  False     4       4  0.355769         7
6    6976.5  False     5       5  0.451923         6
9   10177.0  False     6       6  0.548077         5
1   10197.8  False     7       7  0.644231         4
8   11351.7  False     8       8  0.740385         3
3   15318.6  False     9       9  0.836538         2
5   20683.2  False    10      10  0.932692         1<jupyter_text>Lets check out the probability plot!<jupyter_code>analysis.probplot()<jupyter_output>c:\program files (x86)\python36-32\lib\site-packages\matplotlib\figure.py:2022: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  warnings.warn("This figure includes Axes that are not compatible "<jupyter_text>Looks pretty decent in this case.  For completeness, we should look at the fit tests.<jupyter_code>analysis.fit_test<jupyter_output>DEBUG:weibull.weibull:beta: 1.12, eta: 9573.82<jupyter_text>PlottingThe standard suite of plots are included...<jupyter_code>analysis.pdf()
analysis.sf()
analysis.hazard()
analysis.cdf()
analysis.fr()<jupyter_output>c:\program files (x86)\python36-32\lib\site-packages\matplotlib\figure.py:2022: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  warnings.warn("This figure includes Axes that are not compatible "<jupyter_text>I realize that there is some overlap in the plots - such as `cdf` and `hazard` - but having all of the functions defined makes it easier for the maximum number of user.  Summary DataSome customers insist on metrics such as MTTF, characteristic life, etc., so those are included as well.Note that `mttf` and `mean` are the same metric.  Also note that `characteristic_life` is the same as `eta`, $\eta$.<jupyter_code>print(f'MTTF: {analysis.mttf:.01f}')
print(f'mean life: {analysis.mean:.01f}')
print(f'median life: {analysis.median:.01f}')
print(f'characteristic life: {analysis.characteristic_life:.01f}')<jupyter_output>MTTF: 9190.3
mean life: 9190.3
median life: 6897.3
characteristic life: 9573.8
{'fraction_non_alphanumeric': 0.09105229993698803, 'fraction_numerical': 0.0904221802142407, 'mean_word_length': 3.497167138810198, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '248334', 'license': 'MIT', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1061, 'n_words': 330, 'path': 'examples/Weibull Analysis - Small Data Set.ipynb', 'repo_name': 'slightlynybbled/weibull_orig', 'size': '3174'}