@@ -15,7 +15,7 @@ kernelspec:
15
15
# Reliability Statistics and Predictive Calibration
16
16
17
17
:::{post} January, 2023
18
- :tags: time-to-failure, prediction, calibration
18
+ :tags: time-to-failure, prediction, calibration, survival analysis, censored
19
19
:category: intermediate
20
20
:author: Nathaniel Forde
21
21
:::
@@ -88,7 +88,7 @@ mu, sigma = 6, 0.3
88
88
def plot_ln_pi(mu, sigma, xy=(700, 75), title="Exact Prediction Interval for Known Lognormal"):
89
89
failure_dist = lognorm(s=sigma, scale=np.exp(mu))
90
90
samples = failure_dist.rvs(size=1000, random_state=100)
91
- fig, axs = plt.subplots(1, 3, figsize=(20, 6 ))
91
+ fig, axs = plt.subplots(1, 3, figsize=(20, 10 ))
92
92
axs = axs.flatten()
93
93
axs[0].hist(samples, ec="black", color="slateblue", bins=30)
94
94
axs[0].set_title(f"Failure Time Distribution: LN({mu}, {sigma})")
@@ -331,7 +331,7 @@ def plot_cdfs(actuarial_table, dist_fits=True, ax=None, title="", xy=(3000, 0.5)
331
331
lnf = LogNormalFitter().fit(item_period["t"] + 1e-25, item_period["failed"])
332
332
wbf = WeibullFitter().fit(item_period["t"] + 1e-25, item_period["failed"])
333
333
if ax is None:
334
- fig, ax = plt.subplots(figsize=(20, 8 ))
334
+ fig, ax = plt.subplots(figsize=(20, 10 ))
335
335
ax.plot(
336
336
actuarial_table["t"],
337
337
actuarial_table["F_hat"],
@@ -464,7 +464,7 @@ Next we'll plot the bootstrapped data and the two estimates of coverage we achie
464
464
``` {code-cell} ipython3
465
465
mosaic = """AABB
466
466
CCCC"""
467
- fig, axs = plt.subplot_mosaic(mosaic=mosaic, figsize=(20, 10 ))
467
+ fig, axs = plt.subplot_mosaic(mosaic=mosaic, figsize=(20, 12 ))
468
468
mle_rv = lognorm(s=0.53, scale=np.exp(10.128))
469
469
axs = [axs[k] for k in axs.keys()]
470
470
axs[0].scatter(
0 commit comments