Class PearsonMetrics
- 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
-
-
Field Summary
-
Fields inherited from class ubic.gemma.core.analysis.expression.coexpression.links.AbstractMatrixRowPairAnalysis
HARD_LIMIT_MIN_NUM_USED
-
Fields inherited from interface ubic.gemma.core.analysis.expression.coexpression.links.MatrixRowPairAnalysis
NUM_BINS
-
-
Constructor Summary
Constructors Constructor Description PearsonMetrics(ExpressionDataDoubleMatrix dataMatrix)
PearsonMetrics(ExpressionDataDoubleMatrix dataMatrix, double tmts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculateMetrics()
Calculate the linear correlation matrix of a matrix, allowing missing values.protected double
correlFast(double[] ival, double[] jval, int i, int j)
QuantitationType
getMetricType()
protected void
rowStatistics()
Calculate mean and sumsqsqrt for each row-
Methods inherited from class ubic.gemma.core.analysis.expression.coexpression.links.AbstractMatrixRowPairAnalysis
getCrossHybridizationRejections, getHistogramArrayList, getKeepers, getMatrix, getNumUniqueGenes, getProbeForRow, getScoreInBin, isUsePvalueThreshold, kurtosis, nullMatrix, numCached, setDuplicateMap, setLowerTailThreshold, setMinNumpresent, setOmitNegativeCorrelationLinks, setPValueThreshold, setUpperTailThreshold, setUseAbsoluteValue, setUsePvalueThreshold, size, toString
-
-
-
-
Constructor Detail
-
PearsonMetrics
public PearsonMetrics(ExpressionDataDoubleMatrix dataMatrix)
-
PearsonMetrics
public PearsonMetrics(ExpressionDataDoubleMatrix dataMatrix, double tmts)
- Parameters:
dataMatrix
- DenseDoubleMatrix2DNamedtmts
- 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 Detail
-
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 classAbstractMatrixRowPairAnalysis
-
correlFast
protected double correlFast(double[] ival, double[] jval, int i, int j)
-
-