pub struct OneClassSVM {
pub kernel: OCSVMKernel,
pub nu: f32,
pub gamma: f32,
pub max_iter: usize,
/* private fields */
}Expand description
One-Class SVM for novelty detection
Fields§
§kernel: OCSVMKernel§nu: f32§gamma: f32§max_iter: usizeImplementations§
Source§impl OneClassSVM
impl OneClassSVM
pub fn new() -> Self
pub fn nu(self, nu: f32) -> Self
pub fn gamma(self, gamma: f32) -> Self
pub fn kernel(self, kernel: OCSVMKernel) -> Self
pub fn fit(&mut self, x: &Tensor)
pub fn decision_function(&self, x: &Tensor) -> Tensor
pub fn predict(&self, x: &Tensor) -> Tensor
pub fn fit_predict(&mut self, x: &Tensor) -> Tensor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OneClassSVM
impl RefUnwindSafe for OneClassSVM
impl Send for OneClassSVM
impl Sync for OneClassSVM
impl Unpin for OneClassSVM
impl UnwindSafe for OneClassSVM
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> 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