How do I get the x and y array produced by reliability.Fitters import Fit_Weibull_2P?

81 Views Asked by At

I want to use Python via an MS Azure function to make use of the Reliability libraries.

however, I do not want to use matplot lib to plot the graphs, instead I want all the x , y arrays (curves) and store the data which will then be consumed by a Power BI Dashboard.

how can I do this?

from reliability.Distributions import Weibull_Distribution
from reliability.Fitters import Fit_Weibull_2P
from reliability.Probability_plotting import plot_points
import matplotlib.pyplot as plt

dist = Weibull_Distribution(alpha=30, beta=2)  # creates the distribution object
data = dist.random_samples(20, seed=42)  # draws 20 samples from the distribution. Seeded for repeatability
plt.subplot(121)
fit = Fit_Weibull_2P(failures=data)  # fits a Weibull distribution to the data and generates the probability plot

Apparently, at this stage I can get from the fit object the x and y array but I do not know how? please assist.

0

There are 0 best solutions below