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