pub struct FittedOneClassSVM<F, K> { /* private fields */ }Expand description
Fitted One-Class SVM.
Stores the support vectors and decision boundary. Points are classified as inliers (+1) or outliers (-1) based on the sign of the decision function.
Implementations§
Source§impl<F: Float + Send + Sync + ScalarOperand + 'static, K: Kernel<F> + 'static> FittedOneClassSVM<F, K>
impl<F: Float + Send + Sync + ScalarOperand + 'static, K: Kernel<F> + 'static> FittedOneClassSVM<F, K>
Sourcepub fn decision_function(&self, x: &Array2<F>) -> Result<Array1<F>, FerroError>
pub fn decision_function(&self, x: &Array2<F>) -> Result<Array1<F>, FerroError>
Compute the raw decision function values for each sample.
Returns an array of shape (n_samples,). Positive values indicate
inliers, negative values indicate outliers.
§Errors
Returns Ok always for valid input.
Trait Implementations§
Source§impl<F: Clone, K: Clone> Clone for FittedOneClassSVM<F, K>
impl<F: Clone, K: Clone> Clone for FittedOneClassSVM<F, K>
Source§fn clone(&self) -> FittedOneClassSVM<F, K>
fn clone(&self) -> FittedOneClassSVM<F, K>
Returns a duplicate 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 moreSource§impl<F: Float + Send + Sync + ScalarOperand + 'static, K: Kernel<F> + 'static> Predict<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for FittedOneClassSVM<F, K>
impl<F: Float + Send + Sync + ScalarOperand + 'static, K: Kernel<F> + 'static> Predict<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for FittedOneClassSVM<F, K>
Auto Trait Implementations§
impl<F, K> Freeze for FittedOneClassSVM<F, K>
impl<F, K> RefUnwindSafe for FittedOneClassSVM<F, K>where
K: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, K> Send for FittedOneClassSVM<F, K>
impl<F, K> Sync for FittedOneClassSVM<F, K>
impl<F, K> Unpin for FittedOneClassSVM<F, K>
impl<F, K> UnsafeUnpin for FittedOneClassSVM<F, K>where
K: UnsafeUnpin,
F: UnsafeUnpin,
impl<F, K> UnwindSafe for FittedOneClassSVM<F, K>where
K: UnwindSafe,
F: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more