|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jagg.Aggregator
net.sf.jagg.TwoPropAggregator
net.sf.jagg.CorrelationAggregator
public class CorrelationAggregator
This class represents the "coefficient of correlation" aggregator over two sets of numeric values.
Field Summary |
---|
Fields inherited from class net.sf.jagg.Aggregator |
---|
PROP_SELF |
Constructor Summary | |
---|---|
CorrelationAggregator(java.lang.String properties)
Constructs a CorrelationAggregator on the specified
properties, in the format: property, property2 . |
|
CorrelationAggregator(java.lang.String property,
java.lang.String property2)
Constructs a CorrelationAggregator that operates on the specified
properties. |
Method Summary | |
---|---|
void |
init()
Initialize the internal aggregators: a CovarianceAggregator ,
and 2 VarianceAggregators (one each for both properties). |
void |
iterate(java.lang.Object value)
Iterate the internal aggregators. |
void |
merge(Aggregator agg)
Merge the given Aggregator into this one by merging each
individual internal Aggregator . |
CorrelationAggregator |
replicate()
Returns an uninitialized copy of this Aggregator object,
with the same property(ies) to analyze. |
java.lang.Double |
terminate()
Return the coefficient of correlation, calculated as follows: CovariancePop(prop1, prop2) / Math.sqrt(VariancePop(prop1) * VariancePop(prop2)) |
DoubleDouble |
terminateDoubleDouble()
Return the result as a DoubleDouble . |
Methods inherited from class net.sf.jagg.TwoPropAggregator |
---|
getProperty2, setProperty, toString |
Methods inherited from class net.sf.jagg.Aggregator |
---|
equals, getAggregator, getAggregator, getProperty, getValueFromProperty, hashCode, isInUse, setInUse |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CorrelationAggregator(java.lang.String properties)
CorrelationAggregator
on the specified
properties, in the format: property, property2
.
properties
- A specification string in the format:
property, property2
.public CorrelationAggregator(java.lang.String property, java.lang.String property2)
CorrelationAggregator
that operates on the specified
properties.
property
- Correlate this property with the other.property2
- Correlate this property with the other.Method Detail |
---|
public CorrelationAggregator replicate()
Aggregator
object,
with the same property(ies) to analyze.
replicate
in class Aggregator
Aggregator
object.public void init()
CovarianceAggregator
,
and 2 VarianceAggregators
(one each for both properties).
init
in class Aggregator
CovarianceAggregator
,
VarianceAggregator
public void iterate(java.lang.Object value)
iterate
in class Aggregator
value
- The value to aggregate.Aggregator.getValueFromProperty(java.lang.Object, java.lang.String)
public void merge(Aggregator agg)
Aggregator
into this one by merging each
individual internal Aggregator
.
merge
in class Aggregator
agg
- The Aggregator
to merge into this one.public java.lang.Double terminate()
CovariancePop(prop1, prop2) / Math.sqrt(VariancePop(prop1) * VariancePop(prop2))
terminate
in class Aggregator
Double
.public DoubleDouble terminateDoubleDouble()
DoubleDouble
. This is used mainly
when other Aggregators
that use this result must maintain a
high precision.
terminateDoubleDouble
in class Aggregator
DoubleDouble
, or
NaN
if no values have been accumulated or the variance
for one of the properties is zero.DoubleDouble
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |