Skip to main content

FitConfig

Struct FitConfig 

Source
pub struct FitConfig {
Show 30 fields pub family: Option<String>, pub link: Option<String>, pub flexible_link: bool, pub offset_column: Option<String>, pub noise_offset_column: Option<String>, pub frailty: Option<FrailtySpec>, pub baseline_target: String, pub baseline_scale: Option<f64>, pub baseline_shape: Option<f64>, pub baseline_rate: Option<f64>, pub baseline_makeham: Option<f64>, pub time_basis: String, pub time_degree: usize, pub time_num_internal_knots: usize, pub time_smooth_lambda: f64, pub survival_likelihood: String, pub survival_distribution: String, pub threshold_time_k: Option<usize>, pub threshold_time_degree: usize, pub sigma_time_k: Option<usize>, pub sigma_time_degree: usize, pub noise_formula: Option<String>, pub logslope_formula: Option<String>, pub z_column: Option<String>, pub weight_column: Option<String>, pub scale_dimensions: bool, pub ridge_lambda: f64, pub transformation_normal: bool, pub firth: bool, pub resource_policy: Option<ResourcePolicy>,
}
Expand description

Non-formula configuration for model fitting. All fields have sensible defaults.

Fields§

§family: Option<String>

Family: “gaussian”, “binomial”, “poisson”, “gamma”, or None for auto-detect.

§link: Option<String>

Link: “identity”, “logit”, “probit”, “cloglog”, “sas”, “beta-logistic”, or None.

§flexible_link: bool

Whether to use flexible (wiggle-augmented) link.

§offset_column: Option<String>

Optional additive offset column for the primary linear predictor.

§noise_offset_column: Option<String>

Optional additive offset column for the noise/log-scale predictor.

§frailty: Option<FrailtySpec>

Optional family-level frailty modifier.

§baseline_target: String

Baseline target: “linear”, “weibull”, “gompertz”, “gompertz-makeham”.

§baseline_scale: Option<f64>§baseline_shape: Option<f64>§baseline_rate: Option<f64>§baseline_makeham: Option<f64>§time_basis: String

Time basis: “ispline” or “none”.

§time_degree: usize§time_num_internal_knots: usize§time_smooth_lambda: f64§survival_likelihood: String

Survival likelihood mode: “location-scale”, “transformation”, “weibull”, “marginal-slope”, “latent”, or “latent-binary”.

§survival_distribution: String

Residual distribution: “gaussian”, “logistic”, “gumbel”.

§threshold_time_k: Option<usize>§threshold_time_degree: usize§sigma_time_k: Option<usize>§sigma_time_degree: usize§noise_formula: Option<String>

If set, fit a location-scale model with this formula for the noise parameter.

§logslope_formula: Option<String>

Formula for the log-slope model (survival marginal-slope or Bernoulli marginal-slope).

§z_column: Option<String>

Column name for the z (exposure/dose) variable in marginal-slope models.

§weight_column: Option<String>

Optional non-negative per-row training weights column.

§scale_dimensions: bool§ridge_lambda: f64§transformation_normal: bool

Route the fit through the transformation-normal family. When set, the formula terms are treated as the covariate side of the transformation model and the response basis is built internally. Incompatible with noise_formula and with Surv(...) responses.

§firth: bool

Enable Firth bias reduction for standard single-parameter families.

§resource_policy: Option<ResourcePolicy>

Optional override of the crate::resource::ResourcePolicy used when planning spatial bases (TPS / Matern / Duchon) during term construction. When None, the default-library policy is used.

Trait Implementations§

Source§

impl Clone for FitConfig

Source§

fn clone(&self) -> FitConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FitConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FitConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,