pub struct RestrictedBoltzmannMachine {
pub n_visible: usize,
pub n_hidden: usize,
pub learning_rate: f64,
pub n_epochs: usize,
pub batch_size: usize,
pub n_gibbs_steps: usize,
pub random_state: Option<u64>,
/* private fields */
}Expand description
Restricted Boltzmann Machine (RBM) component
An RBM is a two-layer neural network with visible and hidden units that can learn probability distributions over its inputs.
Fields§
§n_visible: usizen_visible
n_hidden
learning_rate: f64learning_rate
n_epochs: usizen_epochs
batch_size: usizebatch_size
n_gibbs_steps: usizen_gibbs_steps
random_state: Option<u64>random_state
Implementations§
Source§impl RestrictedBoltzmannMachine
impl RestrictedBoltzmannMachine
pub fn new(n_visible: usize, n_hidden: usize) -> Result<Self>
pub fn learning_rate(self, learning_rate: f64) -> Result<Self>
pub fn n_epochs(self, n_epochs: usize) -> Result<Self>
pub fn batch_size(self, batch_size: usize) -> Result<Self>
pub fn n_gibbs_steps(self, n_gibbs_steps: usize) -> Result<Self>
pub fn random_state(self, random_state: u64) -> Self
pub fn fit(&mut self, data: &ArrayView2<'_, f64>) -> Result<()>
pub fn transform(&self, data: &ArrayView2<'_, f64>) -> Result<Array2<f64>>
pub fn reconstruct(&self, data: &ArrayView2<'_, f64>) -> Result<Array2<f64>>
Trait Implementations§
Source§impl Clone for RestrictedBoltzmannMachine
impl Clone for RestrictedBoltzmannMachine
Source§fn clone(&self) -> RestrictedBoltzmannMachine
fn clone(&self) -> RestrictedBoltzmannMachine
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 moreAuto Trait Implementations§
impl Freeze for RestrictedBoltzmannMachine
impl RefUnwindSafe for RestrictedBoltzmannMachine
impl Send for RestrictedBoltzmannMachine
impl Sync for RestrictedBoltzmannMachine
impl Unpin for RestrictedBoltzmannMachine
impl UnwindSafe for RestrictedBoltzmannMachine
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> 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