Struct linfa::composing::platt_scaling::Platt
source · pub struct Platt<F, O> { /* private fields */ }
Expand description
Fitted Platt model
This model contains a sigmoid scaling parameters and a second univariate, uncalibrated model. The output of the uncalibrated model is scaled with the following function:
g(x) = 1 / (1 + exp(A * f(x) + B)
The scaling factors A
and B
are estimated with the Newton’s method, presented in the
following paper: https://www.csie.ntu.edu.tw/~cjlin/papers/plattprob.pdf
Implementations§
Trait Implementations§
source§impl<F: PartialEq, O: PartialEq> PartialEq for Platt<F, O>
impl<F: PartialEq, O: PartialEq> PartialEq for Platt<F, O>
source§impl<F: Float, D, O> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<Pr>, Dim<[usize; 1]>>> for Platt<F, O>
impl<F: Float, D, O> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<Pr>, Dim<[usize; 1]>>> for Platt<F, O>
impl<F: Eq, O: Eq> Eq for Platt<F, O>
impl<F, O> StructuralPartialEq for Platt<F, O>
Auto Trait Implementations§
impl<F, O> RefUnwindSafe for Platt<F, O>where
F: RefUnwindSafe,
O: RefUnwindSafe,
impl<F, O> Send for Platt<F, O>
impl<F, O> Sync for Platt<F, O>
impl<F, O> Unpin for Platt<F, O>
impl<F, O> UnwindSafe for Platt<F, O>where
F: UnwindSafe,
O: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<'a, F, R, T, S, O> Predict<&'a DatasetBase<R, T>, S> for Owhere
R: Records<Elem = F>,
O: PredictInplace<R, S>,
impl<'a, F, R, T, S, O> Predict<&'a DatasetBase<R, T>, S> for Owhere
R: Records<Elem = F>,
O: PredictInplace<R, S>,
fn predict(&self, ds: &'a DatasetBase<R, T>) -> S
source§impl<F, D, E, T, O> Predict<ArrayBase<D, Dim<[usize; 2]>>, DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, T>> for O
impl<F, D, E, T, O> Predict<ArrayBase<D, Dim<[usize; 2]>>, DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, T>> for O
source§impl<F, R, T, E, S, O> Predict<DatasetBase<R, T>, DatasetBase<R, S>> for O
impl<F, R, T, E, S, O> Predict<DatasetBase<R, T>, DatasetBase<R, S>> for O
fn predict(&self, ds: DatasetBase<R, T>) -> DatasetBase<R, S>
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.