All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.waikatodatamining.matrix.algorithm.pls.CCARegression Maven / Gradle / Ivy

There is a newer version: 0.1.0
Show newest version
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