pub struct MultiTaskCCA { /* private fields */ }Expand description
Multi-task Canonical Correlation Analysis
Multi-task CCA learns canonical correlations across multiple related tasks, sharing information between tasks to improve performance on individual tasks.
Implementations§
Source§impl MultiTaskCCA
impl MultiTaskCCA
Sourcepub fn new(n_components: usize, reg_param: f64, sharing_strength: f64) -> Self
pub fn new(n_components: usize, reg_param: f64, sharing_strength: f64) -> Self
Creates a new MultiTaskCCA instance
Sourcepub fn with_max_iter(self, max_iter: usize) -> Self
pub fn with_max_iter(self, max_iter: usize) -> Self
Sets the maximum number of iterations
Sourcepub fn with_tolerance(self, tol: f64) -> Self
pub fn with_tolerance(self, tol: f64) -> Self
Sets the convergence tolerance
Sourcepub fn fit_multi_task(
&self,
x_tasks: &[Array2<f64>],
y_tasks: &[Array2<f64>],
) -> Result<Self, SklearsError>
pub fn fit_multi_task( &self, x_tasks: &[Array2<f64>], y_tasks: &[Array2<f64>], ) -> Result<Self, SklearsError>
Fits multi-task CCA on multiple datasets
Gets the shared canonical weights for X
Gets the shared canonical weights for Y
Sourcepub fn task_weights(&self, task_id: usize) -> Option<&Array2<f64>>
pub fn task_weights(&self, task_id: usize) -> Option<&Array2<f64>>
Gets the task-specific weights for a given task
Sourcepub fn correlations(&self) -> Option<&Array1<f64>>
pub fn correlations(&self) -> Option<&Array1<f64>>
Gets the canonical correlations
Trait Implementations§
Source§impl Clone for MultiTaskCCA
impl Clone for MultiTaskCCA
Source§fn clone(&self) -> MultiTaskCCA
fn clone(&self) -> MultiTaskCCA
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 MultiTaskCCA
impl RefUnwindSafe for MultiTaskCCA
impl Send for MultiTaskCCA
impl Sync for MultiTaskCCA
impl Unpin for MultiTaskCCA
impl UnwindSafe for MultiTaskCCA
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