pub struct RegularizationPath { /* private fields */ }Expand description
A full regularization path — one RegLine per coefficient.
Implements IntoIterator, so chart.draw_series(path) draws every line at
once. For a per-feature legend, iterate RegularizationPath::lines and
call draw_series once per line with its name()/color().
Implementations§
Source§impl RegularizationPath
impl RegularizationPath
Sourcepub fn new(
strengths: &[f64],
coefficients: &[Vec<f64>],
) -> Result<Self, StatsError>
pub fn new( strengths: &[f64], coefficients: &[Vec<f64>], ) -> Result<Self, StatsError>
Build from strengths (x positions) and a coefficients matrix indexed
[strength_row][feature_col] — i.e. coefficients[i][j] is feature j’s
value at strength strengths[i].
Zero-crossing markers are on by default. Errors on empty input or a
ragged matrix (rows of differing width, or a row count that does not
match strengths).
Sourcepub fn feature_names<S: Into<String>, I: IntoIterator<Item = S>>(
self,
names: I,
) -> Self
pub fn feature_names<S: Into<String>, I: IntoIterator<Item = S>>( self, names: I, ) -> Self
Attach feature names (used as per-line legend labels). Extra names are ignored; missing ones leave that line unnamed.
Sourcepub fn zero_markers(self, show: bool) -> Self
pub fn zero_markers(self, show: bool) -> Self
Enable/disable zero-crossing markers on every line.
Sourcepub fn stroke_width(self, width: u32) -> Self
pub fn stroke_width(self, width: u32) -> Self
Set a common stroke width for every line.
Trait Implementations§
Source§impl Clone for RegularizationPath
impl Clone for RegularizationPath
Source§fn clone(&self) -> RegularizationPath
fn clone(&self) -> RegularizationPath
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more