Enum linfa::composing::platt_scaling::PlattError
source · [−]pub enum PlattError {
LineSearchNotConverged,
MaxIterReached,
MaxIterZero,
MinStepNegative(f32),
SigmaNegative(f32),
LinfaError(Error),
}
Expand description
Platt Newton’s method errors
Errors occur when setting invalid parameters or the optimization process fails.
Variants
LineSearchNotConverged
MaxIterReached
MaxIterZero
MinStepNegative(f32)
SigmaNegative(f32)
LinfaError(Error)
Trait Implementations
sourceimpl Clone for PlattError
impl Clone for PlattError
sourcefn clone(&self) -> PlattError
fn clone(&self) -> PlattError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PlattError
impl Debug for PlattError
sourceimpl Display for PlattError
impl Display for PlattError
sourceimpl Error for PlattError
impl Error for PlattError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl<'a, F: Float, O: 'a> FitWith<'a, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<bool>, Dim<[usize; 1]>>, PlattError> for PlattValidParams<F, O> where
O: PredictInplace<Array2<F>, Array1<F>>,
impl<'a, F: Float, O: 'a> FitWith<'a, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<bool>, Dim<[usize; 1]>>, PlattError> for PlattValidParams<F, O> where
O: PredictInplace<Array2<F>, Array1<F>>,
sourcefn fit_with(
&self,
obj: O,
ds: &DatasetBase<Array2<F>, Array1<bool>>
) -> Result<Self::ObjectOut, PlattError>
fn fit_with(
&self,
obj: O,
ds: &DatasetBase<Array2<F>, Array1<bool>>
) -> Result<Self::ObjectOut, PlattError>
Calibrate another model with Platt scaling
This function takes another model and binary decision dataset and calibrates it to produce probability values. The returned model therefore implements the prediction trait for probability targets.
type ObjectIn = O
type ObjectOut = Platt<F, O>
Auto Trait Implementations
impl RefUnwindSafe for PlattError
impl Send for PlattError
impl Sync for PlattError
impl Unpin for PlattError
impl UnwindSafe for PlattError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more