com.github.waikatodatamining.matrix.algorithm.pls.CCARegression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of matrix-algorithms Show documentation
Show all versions of matrix-algorithms Show documentation
Java library of 2-dimensional matrix algorithms.
package com.github.waikatodatamining.matrix.algorithm.pls;
/**
* CCA Canonical Correlation Analysis.
*
* A Survey of Partial Least Squares (PLS) Methods, with Emphasis on the Two-Block Case (2000)
*
* Implementation according to sklearns CCA decomposition:
* sklearn.cross_decomposition.CCA
*
* Parameters: See also {@link NIPALS}.
* - tol: Iterative convergence tolerance
* - maxIter: Maximum number of iterations
* - normYWeights: Flat to normalize Y weights
*
* @author Steven Lang
*/
public class CCARegression extends NIPALS {
private static final long serialVersionUID = -5265196640192613371L;
@Override
protected WeightCalculationMode getWeightCalculationMode() {
return WeightCalculationMode.CCA; // Mode B in sklearn
}
@Override
public DeflationMode getDeflationMode() {
return DeflationMode.CANONICAL;
}
@Override
public void setDeflationMode(DeflationMode deflationMode) {
if (deflationMode != DeflationMode.CANONICAL){
m_Logger.warning("CCARegression only allows CANONICAL deflation mode.");
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy