Package net.sourceforge.jiu.color.data
Class BaseCoOccurrenceFrequencyMatrix
- java.lang.Object
-
- net.sourceforge.jiu.color.data.BaseCoOccurrenceFrequencyMatrix
-
- All Implemented Interfaces:
CoOccurrenceFrequencyMatrix
- Direct Known Subclasses:
MemoryCoOccurrenceFrequencyMatrix
public abstract class BaseCoOccurrenceFrequencyMatrix extends Object implements CoOccurrenceFrequencyMatrix
This abstract class encapsulates all data of a co-occurrence frequency matrix except for the frequency values. The method computeStatistics is implemented. Any class extending this class only has to deal with storing the frequency values (MemoryCoOccurrenceFrequencyMatrix
does this by using a one-dimensional array internally).- Author:
- Marco Schmidt
-
-
Field Summary
Fields Modifier and Type Field Description private double[]
cofMean
co-occurrence frequency mean $\mu_{C(j)}$private double[]
cofStddev
co-occurrence frequency standard deviation $\sigma_{C(j)}$private double
scofMean
self co-occurrence frequency mean $\mu_S$private double
scofStddev
self co-occurrence frequency standard deviation $\sigma_S$private double
scofSum
equals scofMean + scofStddev
-
Constructor Summary
Constructors Constructor Description BaseCoOccurrenceFrequencyMatrix()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
computeCoOccurrenceFrequencyMeanValues()
private void
computeCoOccurrenceFrequencyStandardDeviationValues()
private void
computeSelfCoOccurrenceFrequencyMeanValue()
private void
computeSelfCoOccurrenceFrequencyStandardDeviationValue()
void
computeStatistics()
Assumes that the co-occurrence frequency values have been initialized.double
getMean(int index)
Returns the mean of the co-occurrence frequency values.double
getScofMean()
Returns the mean of all self co-occurrence frequency values.double
getScofStddev()
Returns the standard deviation of all self co-occurrence frequency values.double
getScofSum()
Return the sum of mean and standard deviation of the self co-occurrence frequency values.double
getStddev(int index)
Returns the standard deviation of the values getValue(index, i) with i running from 0 toCoOccurrenceFrequencyMatrix.getDimension()
- 1.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.jiu.color.data.CoOccurrenceFrequencyMatrix
clear, getDimension, getValue, getValue, setValue
-
-
-
-
Field Detail
-
cofMean
private double[] cofMean
co-occurrence frequency mean $\mu_{C(j)}$
-
cofStddev
private double[] cofStddev
co-occurrence frequency standard deviation $\sigma_{C(j)}$
-
scofMean
private double scofMean
self co-occurrence frequency mean $\mu_S$
-
scofStddev
private double scofStddev
self co-occurrence frequency standard deviation $\sigma_S$
-
scofSum
private double scofSum
equals scofMean + scofStddev
-
-
Method Detail
-
computeCoOccurrenceFrequencyMeanValues
private void computeCoOccurrenceFrequencyMeanValues()
-
computeCoOccurrenceFrequencyStandardDeviationValues
private void computeCoOccurrenceFrequencyStandardDeviationValues()
-
computeSelfCoOccurrenceFrequencyMeanValue
private void computeSelfCoOccurrenceFrequencyMeanValue()
-
computeSelfCoOccurrenceFrequencyStandardDeviationValue
private void computeSelfCoOccurrenceFrequencyStandardDeviationValue()
-
computeStatistics
public void computeStatistics()
Assumes that the co-occurrence frequency values have been initialized. Computes mean and standard deviation for co-occurrence and self co-occurrence frequency values.- Specified by:
computeStatistics
in interfaceCoOccurrenceFrequencyMatrix
-
getMean
public double getMean(int index)
Returns the mean of the co-occurrence frequency values.- Specified by:
getMean
in interfaceCoOccurrenceFrequencyMatrix
-
getStddev
public double getStddev(int index)
Description copied from interface:CoOccurrenceFrequencyMatrix
Returns the standard deviation of the values getValue(index, i) with i running from 0 toCoOccurrenceFrequencyMatrix.getDimension()
- 1.- Specified by:
getStddev
in interfaceCoOccurrenceFrequencyMatrix
- Parameters:
index
- first argument to all calls of getValue used to determine the standard deviation
-
getScofMean
public double getScofMean()
Returns the mean of all self co-occurrence frequency values. This value is called $\mu_S$ in Shufelt's paper. This value is determined once within computeStatistics().- Specified by:
getScofMean
in interfaceCoOccurrenceFrequencyMatrix
-
getScofStddev
public double getScofStddev()
Returns the standard deviation of all self co-occurrence frequency values. This value is called $\sigma_S$ in Shufelt's paper. This value is determined once within a call to computeStatistics().- Specified by:
getScofStddev
in interfaceCoOccurrenceFrequencyMatrix
- Returns:
- standard deviation for pairs
-
getScofSum
public double getScofSum()
Return the sum of mean and standard deviation of the self co-occurrence frequency values. Assumes thatcomputeStatistics()
has been called already.- Specified by:
getScofSum
in interfaceCoOccurrenceFrequencyMatrix
- Returns:
- sum of mean and standard deviation of the self co-occurrence frequency values
-
-