Struct pav_regression::pav::IsotonicRegression
source · pub struct IsotonicRegression { /* private fields */ }
Expand description
A vector of points forming an isotonic regression, along with the centroid point of the original set.
Implementations§
source§impl IsotonicRegression
impl IsotonicRegression
sourcepub fn new_ascending(points: &[Point]) -> IsotonicRegression
pub fn new_ascending(points: &[Point]) -> IsotonicRegression
Find an ascending isotonic regression from a set of points
sourcepub fn new_descending(points: &[Point]) -> IsotonicRegression
pub fn new_descending(points: &[Point]) -> IsotonicRegression
Find a descending isotonic regression from a set of points
sourcepub fn interpolate(&self, at_x: f64) -> Option<f64>
pub fn interpolate(&self, at_x: f64) -> Option<f64>
Find the y point at position at_x
or None if the regression is empty
sourcepub fn get_points(&self) -> &[Point]
pub fn get_points(&self) -> &[Point]
Retrieve the points that make up the isotonic regression
sourcepub fn get_centroid_point(&self) -> Option<Point>
pub fn get_centroid_point(&self) -> Option<Point>
Retrieve the mean point of the original point set
sourcepub fn add_points(&mut self, points: &[Point])
pub fn add_points(&mut self, points: &[Point])
Add new points to the regression
sourcepub fn remove_points(&mut self, points: &[Point])
pub fn remove_points(&mut self, points: &[Point])
Remove points by inverting their weight and adding
Trait Implementations§
source§impl Clone for IsotonicRegression
impl Clone for IsotonicRegression
source§fn clone(&self) -> IsotonicRegression
fn clone(&self) -> IsotonicRegression
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more