java.lang.Object
ubic.gemma.core.analysis.expression.coexpression.links.AbstractMatrixRowPairAnalysis
ubic.gemma.core.analysis.expression.coexpression.links.PearsonMetrics
All Implemented Interfaces:
MatrixRowPairAnalysis
Direct Known Subclasses:
SpearmanMetrics

public class PearsonMetrics extends AbstractMatrixRowPairAnalysis
A correlation analysis for a given data set, designed for selection of values based on criteria set by the user. On the first pass over the data, a histogram is filled in to hold the distribution of the values found. You can set criteria to have the correlations actually stored in a (sparse) matrix. This can take a lot of memory if you store everything! The correlation is only calculated if it isn't stored in the matrix, and values can be tested against a threshold. This class is used in reality by one pass over the data to fill in the histogram. This is used to help select a threshold. A second pass over the data is used to select correlations that meet the criteria. Probes that do not map to genes are not used.
Author:
Paul Pavlidis
  • Constructor Details

    • PearsonMetrics

      public PearsonMetrics(ExpressionDataDoubleMatrix dataMatrix)
    • PearsonMetrics

      public PearsonMetrics(ExpressionDataDoubleMatrix dataMatrix, double tmts)
      Parameters:
      dataMatrix - DenseDoubleMatrix2DNamed
      tmts - Values of the correlation that are deemed too small to store in the matrix. Setting this as high as possible can greatly reduce memory requirements, but can slow things down.
  • Method Details

    • calculateMetrics

      public void calculateMetrics()
      Calculate the linear correlation matrix of a matrix, allowing missing values. If there are no missing values, this calls PearsonFast.
    • getMetricType

      public QuantitationType getMetricType()
    • rowStatistics

      protected void rowStatistics()
      Calculate mean and sumsqsqrt for each row
      Specified by:
      rowStatistics in class AbstractMatrixRowPairAnalysis
    • correlFast

      protected double correlFast(double[] ival, double[] jval, int i, int j)