[−][src]Struct petal_decomposition::FastIca
Independent component analysis using the FastICA algorithm.
Examples
use petal_decomposition::FastIca; let x = ndarray::arr2(&[[0_f64, 0_f64], [1_f64, 1_f64], [1_f64, -1_f64]]); let mut ica = FastIca::new(); let y = ica.fit_transform(&x).unwrap();
Implementations
impl<A> FastIca<A, Pcg> where
A: Scalar + Lapack,
[src]
A: Scalar + Lapack,
#[must_use]pub fn new() -> Self
[src]
Creates an ICA model with a random seed.
It uses a PCG random number generator (the XSL 128/64 (MCG) variant on a 64-bit CPU and the XSH RR 64/32 (LCG) variant on a 32-bit CPU), initialized with a randomly-generated seed.
#[must_use]pub fn with_seed(seed: u128) -> Self
[src]
Creates an ICA model with the given seed for random number generation.
It uses a PCG random number generator (the XSL 128/64 (MCG) variant on a
64-bit CPU and the XSH RR 64/32 (LCG) variant on a 32-bit CPU). Use
with_rng
for a different random number generator.
impl<A, R> FastIca<A, R> where
A: Scalar + Lapack,
R: Rng,
[src]
A: Scalar + Lapack,
R: Rng,
#[must_use]pub fn with_rng(rng: R) -> Self
[src]
Creates an ICA model with the given random number generator.
pub fn fit<S>(
&mut self,
input: &ArrayBase<S, Ix2>
) -> Result<(), DecompositionError> where
S: Data<Elem = A>,
[src]
&mut self,
input: &ArrayBase<S, Ix2>
) -> Result<(), DecompositionError> where
S: Data<Elem = A>,
Fits the model with input
.
Errors
DecompositionError::LinalgError
if the underlying Singular Vector Decomposition routine fails.
pub fn transform<S>(
&self,
input: &ArrayBase<S, Ix2>
) -> Result<Array2<A>, DecompositionError> where
S: Data<Elem = A>,
[src]
&self,
input: &ArrayBase<S, Ix2>
) -> Result<Array2<A>, DecompositionError> where
S: Data<Elem = A>,
Applies ICA to input
.
Errors
DecompositionError::InvalidInput
if the number of features ininput
does not match that of the training data.
pub fn fit_transform<S>(
&mut self,
input: &ArrayBase<S, Ix2>
) -> Result<Array2<A>, DecompositionError> where
S: Data<Elem = A>,
[src]
&mut self,
input: &ArrayBase<S, Ix2>
) -> Result<Array2<A>, DecompositionError> where
S: Data<Elem = A>,
Trait Implementations
Auto Trait Implementations
impl<A, R> RefUnwindSafe for FastIca<A, R> where
A: RefUnwindSafe,
R: RefUnwindSafe,
A: RefUnwindSafe,
R: RefUnwindSafe,
impl<A, R> Send for FastIca<A, R> where
A: Send,
R: Send,
A: Send,
R: Send,
impl<A, R> Sync for FastIca<A, R> where
A: Sync,
R: Sync,
A: Sync,
R: Sync,
impl<A, R> Unpin for FastIca<A, R> where
R: Unpin,
R: Unpin,
impl<A, R> UnwindSafe for FastIca<A, R> where
A: RefUnwindSafe,
R: UnwindSafe,
A: RefUnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,