Propagating Crack Region

Frequentist (Monte Carlo)

The posterior can be sampled to determine the El Haddad curve at different failure probabilities, thereby estimating the probabilistic propagating crack region.

Firstly, let us instance an object of class bfade.statistics.MonteCarlo:

mc = MonteCarlo(ElHaddadCurve)

We can now sample:

  • the joint posterior distribution

    mc.sample(aIntNSamples, "joint", bay)
    
  • the marginal posterior distribution

    mc.sample(aIntNSamples, "marginals", bay)
    

where aIntNSample is the number of samples drawn from the posterior.

That’s it, the Monte Carlo simulation is accomplished. If we wish to computed the prediction interval, i.e. the frequentist propagating crack region, we invoke:

mean, pred, x = mc.prediction_interval(aListXEgdes, aIntSamples, "log", aFloatConfidence)

which compute the \(\sqrt{\text{area}}\)-wise prediction interval:

\[P[\overline{\mathcal{E}^{(\mathsf{M})}} - \mathcal{P}^{(\mathsf{M})} \le \mathcal{E}^{({\mathsf{M}}+1)} \le \overline{\mathcal{E}^{(\mathsf{M})}} +\mathcal{P}^{(\mathsf{M})}] = \beta\]

where \(\overline{\mathcal{E}^{(\mathsf{M})}}\) is the \(\sqrt{\text{area}}\)-wise expected value of the set of El Haddad curves and \(\mathcal{P}^{(\mathsf{M})}\) is the semi-amplitude of the prediction interval:

\[\mathcal{P}^{(\sf M)} = T_{\beta}\ S^{(\sf M)} \sqrt{1 + 1/{\mathsf{M}}}\]

in which \(T_\beta\) is the \(1-\beta/2\) percentile of \(T\)-Student distribution, and \(S^{(\sf M)}\) is the \(\sqrt{\text{area}}\)-wise standard deviation of the history of the \(\mathsf{M}\) EH curves.

It is worth mentioning we prefer not to call prediction_interval (although possible) to compute the prediction interval. Rather, we retrieve those using the corresponding viewer’s interface (see the forthcoming sections).

Bayesian

An alternative approach to outlining the crack is offered in bfade.ElHaddadBayes.predictive_posterior. The method implements the numerical computation of the predictive posterior:

\[P[\mathbf{x}^* | D] = \int_\theta P[\mathbf{x}^* | \theta] P[\theta | D]\, d\theta\]

where \(\mathbf{x}^*\) is an unseen datum, and \(P[\mathbf{x}^* | \theta]\) is given by Logistic Regression. Since the integral is analytically intractable in most of the cases, the numerical approximation is implemented:

\[P[\mathbf{x}^* | D] = \sum_{i=1}^{\mathsf{P}} P[\mathbf{x}^* | \theta^{(i)}]\]

where \(\theta^{(i)}\, i = 1,2,\dots, \mathsf{P}\) are samples drawn from the joint posterior.

Let us prepare a grid of points over which the posterior is evaluated. We user the utility bfade.util.grid_factory:

X1, X2 = grid_factory(aListX1Edges, aListX2Edges, aIntN1, aIntN2, spacing="log")

which basically creates a regular rectangular grid (\(\sqrt{\text{area}}\times \Delta\sigma_w\)) whose point are log-spaced, spanning aListX1Edges and aListX2Edges, with a number of aIntN1 and aIntN1.

The evaluation of the predictive posterior is done by:

pred = bay.predictive_posterior(aIntSamples, dataset, aFunction)

where aIntSamples is the number of samples drawn from the posterior, and dataset is an instance of bfade.dataset.Dataset. Importantly, aFunction can be used to load numpy functions to process the predictions. For instance, we can compute the mean and the standard deviation by passing np.mean and np.std , respectively.

Similarly to the frequentist counterpart, we prefer to retrieve the predictive posterior by using the corresponding viewer’s interface (see the forthcoming sections).