pub struct CalibrationCurve { /* private fields */ }Expand description
A reliability diagram as a drawable series (coordinate space (f64, f64) =
(mean predicted probability, observed frequency)).
Implementations§
Source§impl CalibrationCurve
impl CalibrationCurve
Sourcepub fn from_scores(
scores: &[f64],
labels: &[bool],
n_bins: usize,
) -> Result<Self, StatsError>
pub fn from_scores( scores: &[f64], labels: &[bool], n_bins: usize, ) -> Result<Self, StatsError>
Build from predicted scores (probabilities) and true binary labels,
using n_bins equal-width bins over [0, 1].
Sourcepub fn diagonal(self, show: bool) -> Self
pub fn diagonal(self, show: bool) -> Self
Show/hide the y = x perfect-calibration reference line.
Sourcepub fn stroke_width(self, width: u32) -> Self
pub fn stroke_width(self, width: u32) -> Self
Set the line stroke width in pixels.
Trait Implementations§
Source§impl Clone for CalibrationCurve
impl Clone for CalibrationCurve
Source§fn clone(&self) -> CalibrationCurve
fn clone(&self) -> CalibrationCurve
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CalibrationCurve
impl Debug for CalibrationCurve
Source§impl<DB: DrawingBackend> Drawable<DB> for CalibrationCurve
impl<DB: DrawingBackend> Drawable<DB> for CalibrationCurve
Auto Trait Implementations§
impl Freeze for CalibrationCurve
impl RefUnwindSafe for CalibrationCurve
impl Send for CalibrationCurve
impl Sync for CalibrationCurve
impl Unpin for CalibrationCurve
impl UnsafeUnpin for CalibrationCurve
impl UnwindSafe for CalibrationCurve
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB> + 'b,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB> + 'b,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
Source§fn into_dyn(self) -> DynElement<'b, DB, Coord>
fn into_dyn(self) -> DynElement<'b, DB, Coord>
Make the conversion