ConfigBuilder

Struct ConfigBuilder 

Source
pub struct ConfigBuilder { /* private fields */ }
Expand description

Builder for constructing PicardConfig with a fluent API.

Implementations§

Source§

impl ConfigBuilder

Source

pub fn new() -> Self

Create a new builder with default values.

Source

pub fn density(self, density: DensityType) -> Self

Set the density function.

Source

pub fn n_components(self, n: usize) -> Self

Set the number of components to extract.

Source

pub fn ortho(self, ortho: bool) -> Self

Enable or disable orthogonal constraint (Picard-O).

Source

pub fn extended(self, extended: bool) -> Self

Enable or disable extended algorithm for mixed sub/super-Gaussian sources.

Source

pub fn whiten(self, whiten: bool) -> Self

Enable or disable whitening.

Source

pub fn centering(self, centering: bool) -> Self

Enable or disable centering.

Source

pub fn max_iter(self, max_iter: usize) -> Self

Set the maximum number of iterations.

Source

pub fn tol(self, tol: f64) -> Self

Set the convergence tolerance.

Source

pub fn m(self, m: usize) -> Self

Set the L-BFGS memory size.

Source

pub fn ls_tries(self, ls_tries: usize) -> Self

Set the maximum line search attempts.

Source

pub fn lambda_min(self, lambda_min: f64) -> Self

Set the minimum eigenvalue for Hessian regularization.

Source

pub fn w_init(self, w_init: Array2<f64>) -> Self

Set the initial unmixing matrix.

Source

pub fn fastica_it(self, iterations: usize) -> Self

Set the number of FastICA pre-iterations.

Note: Cannot be used together with jade_it.

Source

pub fn jade_it(self, iterations: usize) -> Self

Set the number of JADE pre-iterations.

JADE (Joint Approximate Diagonalization of Eigenmatrices) uses fourth-order cumulants and Jacobi rotations for joint diagonalization. It can provide a better warm start than FastICA for some distributions.

Note: Cannot be used together with fastica_it.

Source

pub fn random_state(self, seed: u64) -> Self

Set the random seed.

Source

pub fn verbose(self, verbose: bool) -> Self

Enable or disable verbose output.

Source

pub fn build(self) -> PicardConfig

Build the configuration.

Source

pub fn build_validated(self) -> Result<PicardConfig, PicardError>

Build and validate the configuration.

Trait Implementations§

Source§

impl Default for ConfigBuilder

Source§

fn default() -> ConfigBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V