pub struct BernoulliMarginalSlopePredictor {Show 16 fields
pub beta_marginal: Array1<f64>,
pub beta_logslope: Array1<f64>,
pub beta_score_warp: Option<Array1<f64>>,
pub beta_link_dev: Option<Array1<f64>>,
pub base_link: InverseLink,
pub z_column: String,
pub latent_z_normalization: SavedLatentZNormalization,
pub latent_measure: LatentMeasureKind,
pub baseline_marginal: f64,
pub baseline_logslope: f64,
pub covariance: Option<Array2<f64>>,
pub score_warp_runtime: Option<SavedCompiledFlexBlock>,
pub link_deviation_runtime: Option<SavedCompiledFlexBlock>,
pub gaussian_frailty_sd: Option<f64>,
pub latent_z_calibration: Option<LatentZRankIntCalibration>,
pub latent_z_conditional_calibration: Option<LatentZConditionalCalibration>,
}Fields§
§beta_marginal: Array1<f64>§beta_logslope: Array1<f64>§beta_score_warp: Option<Array1<f64>>§beta_link_dev: Option<Array1<f64>>§base_link: InverseLink§z_column: String§latent_z_normalization: SavedLatentZNormalization§latent_measure: LatentMeasureKind§baseline_marginal: f64§baseline_logslope: f64§covariance: Option<Array2<f64>>§score_warp_runtime: Option<SavedCompiledFlexBlock>§link_deviation_runtime: Option<SavedCompiledFlexBlock>§gaussian_frailty_sd: Option<f64>§latent_z_calibration: Option<LatentZRankIntCalibration>§latent_z_conditional_calibration: Option<LatentZConditionalCalibration>Implementations§
Source§impl BernoulliMarginalSlopePredictor
impl BernoulliMarginalSlopePredictor
pub fn likelihood_family(&self) -> LikelihoodSpec
pub fn mean_from_eta( &self, eta: &Array1<f64>, ) -> Result<Array1<f64>, EstimationError>
pub fn mean_derivative_from_eta( &self, eta: &Array1<f64>, ) -> Result<Array1<f64>, EstimationError>
pub fn from_unified( unified: &UnifiedFitResult, z_column: String, latent_z_normalization: SavedLatentZNormalization, latent_measure: LatentMeasureKind, baseline_marginal: f64, baseline_logslope: f64, base_link: InverseLink, frailty: FrailtySpec, score_warp_runtime: Option<SavedCompiledFlexBlock>, link_deviation_runtime: Option<SavedCompiledFlexBlock>, latent_z_calibration: Option<LatentZRankIntCalibration>, latent_z_conditional_calibration: Option<LatentZConditionalCalibration>, ) -> Result<Self, String>
pub fn theta(&self) -> Array1<f64>
pub fn final_eta_and_gradient_from_theta( &self, input: &PredictInput, theta: &Array1<f64>, need_gradient: bool, ) -> Result<(Array1<f64>, Option<Array2<f64>>), EstimationError>
Sourcepub fn final_eta_from_theta(
&self,
input: &PredictInput,
theta: &Array1<f64>,
) -> Result<Array1<f64>, EstimationError>
pub fn final_eta_from_theta( &self, input: &PredictInput, theta: &Array1<f64>, ) -> Result<Array1<f64>, EstimationError>
Per-row final (base-scale) linear predictor for an arbitrary
coefficient vector theta in the saved [marginal | logslope | score_warp? | link_dev?] block order. The marginal-slope rigid
kernel is applied exactly per row, so the returned η is the same
object the point predictor consumes — only parameterised by an
external draw instead of self.theta(). Used by the posterior
predictive path (#1049) to map each Laplace draw to its η surface
before the shared eta→bands collapse; the response scale is the
probit inverse link μ = Φ(η).
Sourcepub fn theta_len(&self) -> usize
pub fn theta_len(&self) -> usize
Length of the concatenated coefficient vector this predictor
consumes (marginal + logslope + score_warp? + link_dev?). The
posterior predictive path validates each saved draw against this
before mapping it through Self::final_eta_from_theta.
Sourcepub fn predict_eta_and_q_chain(
&self,
input: &PredictInput,
) -> Result<(Array1<f64>, Array1<f64>), EstimationError>
pub fn predict_eta_and_q_chain( &self, input: &PredictInput, ) -> Result<(Array1<f64>, Array1<f64>), EstimationError>
Per-row (eta, ∂eta/∂q_marginal) under the exact IFT pull-back.
Returns the same eta as predict_plugin_response/predict_linear_predictor
plus the analytic derivative of the internal probit index with respect to
the per-row marginal q (the linear predictor before the de-nested
calibration). Survival prediction multiplies the second component by the
per-row dq/dt to obtain the exact hazard time derivative under
score-warp / link-deviation flex blocks.
Rigid path (no flex blocks): ∂eta/∂q = c = sqrt(1 + (s b)^2), recovering
the rigid-path probit-frailty composition. Flex path: ∂eta/∂q = scale · link_c_obs · a_q where link_c_obs = 1 + Δ_w'(eta_base) is the
link-deviation slope at the observed eta_base = a + b z and a_q = φ(q) / |F_a| is the implicit-function derivative of the calibration
intercept (mirrors the bernoulli final_eta_and_gradient_from_theta
flex branch lines 1399-1593).
Auto Trait Implementations§
impl Freeze for BernoulliMarginalSlopePredictor
impl RefUnwindSafe for BernoulliMarginalSlopePredictor
impl Send for BernoulliMarginalSlopePredictor
impl Sync for BernoulliMarginalSlopePredictor
impl Unpin for BernoulliMarginalSlopePredictor
impl UnsafeUnpin for BernoulliMarginalSlopePredictor
impl UnwindSafe for BernoulliMarginalSlopePredictor
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.