Skip to main content

FitRequestConfigDocument

Struct FitRequestConfigDocument 

Source
pub struct FitRequestConfigDocument {
Show 49 fields pub adaptive_regularization: Option<bool>, pub baseline_makeham: Option<f64>, pub baseline_rate: Option<f64>, pub baseline_scale: Option<f64>, pub baseline_shape: Option<f64>, pub baseline_target: Option<String>, pub ctn_stage1: Option<CtnStage1Document>, pub expectile_tau: Option<f64>, pub family: Option<String>, pub firth: Option<bool>, pub flexible_link: Option<bool>, pub frailty_kind: Option<String>, pub frailty_sd: Option<f64>, pub gpu: Option<String>, pub group_metadata: Option<BTreeMap<String, Value>>, pub hazard_loading: Option<String>, pub latent_coordinates: Option<LatentCoordinatesDocument>, pub link: Option<String>, pub logslope_formula: Option<String>, pub negative_binomial_theta: Option<f64>, pub noise_formula: Option<String>, pub noise_offset: Option<String>, pub offset: Option<String>, pub outer_max_iter: Option<usize>, pub analytic_penalties: Option<AnalyticPenaltiesDocument>, pub pilot_subsample_threshold: Option<usize>, pub precision_hyperpriors: Option<BTreeMap<String, PrecisionHyperpriorDocument>>, pub precompute_conformal: Option<bool>, pub persistent_warm_start_root: Option<PathBuf>, pub ridge_lambda: Option<f64>, pub scale_dimensions: Option<bool>, pub logslope_time_degree: Option<usize>, pub logslope_time_k: Option<usize>, pub sigma_time_degree: Option<usize>, pub sigma_time_k: Option<usize>, pub smooth_descriptors: Option<SmoothDescriptorsDocument>, pub survival_distribution: Option<String>, pub survival_likelihood: Option<String>, pub survival_time_anchor: Option<f64>, pub threshold_time_degree: Option<usize>, pub threshold_time_k: Option<usize>, pub time_basis: Option<String>, pub time_degree: Option<usize>, pub time_num_internal_knots: Option<usize>, pub time_smooth_lambda: Option<f64>, pub training_table_kind: Option<String>, pub transformation_normal: Option<bool>, pub weights: Option<String>, pub z_column: Option<String>,
}
Expand description

Serializable model configuration shared by Rust, Python, and the CLI.

Optional fields mean “use the core gam_models::fit_orchestration::FitConfig default”. The document deliberately has one spelling for each concept; the parser does not carry aliases or legacy wire formats.

Fields§

§adaptive_regularization: Option<bool>§baseline_makeham: Option<f64>§baseline_rate: Option<f64>§baseline_scale: Option<f64>§baseline_shape: Option<f64>§baseline_target: Option<String>§ctn_stage1: Option<CtnStage1Document>§expectile_tau: Option<f64>§family: Option<String>§firth: Option<bool>§flexible_link: Option<bool>§frailty_kind: Option<String>§frailty_sd: Option<f64>§gpu: Option<String>§group_metadata: Option<BTreeMap<String, Value>>§hazard_loading: Option<String>§latent_coordinates: Option<LatentCoordinatesDocument>§link: Option<String>§logslope_formula: Option<String>§negative_binomial_theta: Option<f64>§noise_formula: Option<String>§noise_offset: Option<String>§offset: Option<String>§outer_max_iter: Option<usize>§analytic_penalties: Option<AnalyticPenaltiesDocument>§pilot_subsample_threshold: Option<usize>§precision_hyperpriors: Option<BTreeMap<String, PrecisionHyperpriorDocument>>§precompute_conformal: Option<bool>

Whether to precompute the distribution-free conformal substrates (#942 jackknife+, #1098 exact full-conformal) at fit time and persist them on the saved model. Omit to keep the default of precomputing whenever the fit is eligible; false skips both.

Measured on y ~ s(x1,k=6) + s(x2,k=6) (#2633): the two substrates are 94% of a saved Gaussian model at n=20,000 (10.2 MB of 10.85 MB) and grow linearly with the training rows. Rebuilding both costs ~5.6 ms, 0.3% of the fit, and stays under half a second out to p=253. So turning this off yields a ~16x smaller model (10.85 MB -> ~0.65 MB at n=20,000).

It is opt-OUT because rebuilding needs the training design AND response back, which a saved model deliberately does not carry: a model shipped to a host that never sees the training data must keep them or it cannot produce a conformal interval at all. Turn it off when the caller retains its training data, fits in batch, or never asks for conformal intervals.

§persistent_warm_start_root: Option<PathBuf>

Explicit root for cross-process warm starts. Omit to disable on-disk persistence. The path is used exactly as supplied; no temp/cache discovery or environment fallback is performed.

§ridge_lambda: Option<f64>§scale_dimensions: Option<bool>§logslope_time_degree: Option<usize>§logslope_time_k: Option<usize>

Number of B-spline basis functions on the log t margin of the survival marginal-slope log-slope block (gam#2765, gam#2767). Omitted = a slope that does not move along follow-up.

§sigma_time_degree: Option<usize>§sigma_time_k: Option<usize>§smooth_descriptors: Option<SmoothDescriptorsDocument>§survival_distribution: Option<String>§survival_likelihood: Option<String>§survival_time_anchor: Option<f64>

Explicit centering anchor for the survival baseline time basis, in the data’s own time units. Omit to let the fit pick it from the likelihood mode and the truncation shape of the data — the robust interior median exit for marginal-slope and for any genuinely left-truncated dataset (#751/#1790), the earliest entry age otherwise.

The CLI’s --survival-time-anchor declares a conflict with --request on the premise that this document carries the complete scientific model configuration; until #2631 the document had no field for it, so the premise was false.

§threshold_time_degree: Option<usize>§threshold_time_k: Option<usize>§time_basis: Option<String>§time_degree: Option<usize>§time_num_internal_knots: Option<usize>§time_smooth_lambda: Option<f64>§training_table_kind: Option<String>

Container type of the caller’s training table ("pandas", "polars", "pyarrow", "numpy", …), passed through opaquely into the saved model payload for the predict-time output-container fallback (#394).

§transformation_normal: Option<bool>§weights: Option<String>§z_column: Option<String>

Trait Implementations§

Source§

impl Clone for FitRequestConfigDocument

Source§

fn clone(&self) -> FitRequestConfigDocument

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 FitRequestConfigDocument

Source§

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

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

impl Default for FitRequestConfigDocument

Source§

fn default() -> FitRequestConfigDocument

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

impl<'de> Deserialize<'de> for FitRequestConfigDocument

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for FitRequestConfigDocument

Source§

fn eq(&self, other: &FitRequestConfigDocument) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for FitRequestConfigDocument

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FitRequestConfigDocument

Auto Trait Implementations§

Blanket Implementations§

Source§

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

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<C> CloneExpand for C
where C: Clone,

Source§

fn __expand_clone_method(&self, _scope: &mut Scope) -> C

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoComptime for T

Source§

fn comptime(self) -> Self

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

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<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<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

Source§

type At<'a> = T

The concrete input type at lifetime 'a.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more