Learn R Programming

neuralGAM (version 2.0.1)

.mc_dropout_forward: Internal helper: MC Dropout forward sampling

Description

Run passes stochastic forward passes with Dropout active at prediction time. Each pass samples a dropout mask and produces predictions, simulating epistemic uncertainty.

Usage

.mc_dropout_forward(model, x, passes, output_dim)

Value

A numeric array of shape [passes, n_obs, output_dim].

Arguments

model

Fitted Keras model for one smooth term.

x

Input matrix (converted to TensorFlow tensor internally).

passes

Number of stochastic passes (>=2).

output_dim

Expected number of outputs per observation (e.g., 1 = mean only, 3 = quantile heads (lwr, upr, mean)).

Author

Ines Ortega-Fernandez, Marta Sestelo