pub struct MLPClassifier {
pub hidden_layer_sizes: Vec<usize>,
pub activation: Activation,
pub solver: MLPSolver,
pub alpha: f32,
pub learning_rate_init: f32,
pub max_iter: usize,
pub tol: f32,
pub batch_size: usize,
pub momentum: f32,
/* private fields */
}Expand description
Multi-Layer Perceptron Classifier
Fields§
§activation: Activation§solver: MLPSolver§alpha: f32§learning_rate_init: f32§max_iter: usize§tol: f32§batch_size: usize§momentum: f32Implementations§
Source§impl MLPClassifier
impl MLPClassifier
pub fn new(hidden_layer_sizes: Vec<usize>) -> Self
pub fn activation(self, act: Activation) -> Self
pub fn solver(self, solver: MLPSolver) -> Self
pub fn max_iter(self, n: usize) -> Self
pub fn learning_rate(self, lr: f32) -> Self
pub fn fit(&mut self, x: &Tensor, y: &Tensor)
pub fn predict(&self, x: &Tensor) -> Tensor
pub fn predict_proba(&self, x: &Tensor) -> Tensor
pub fn score(&self, x: &Tensor, y: &Tensor) -> f32
Auto Trait Implementations§
impl Freeze for MLPClassifier
impl RefUnwindSafe for MLPClassifier
impl Send for MLPClassifier
impl Sync for MLPClassifier
impl Unpin for MLPClassifier
impl UnwindSafe for MLPClassifier
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