public final class TargetStatistics extends Object
<BayesInput fieldName="continuous1"> <Extension name="targetStatistics"> <TargetStatistics value="bad" mean="7.5" nonNullCount="4" sum="30.0" sumSquares="230.0" variance="1.6666666666666667"/> <TargetStatistics value="good" mean="3.0" nonNullCount="5" sum="15.0" sumSquares="55.0" variance="2.5"/> <TargetStatistics value="ok" mean="11.0" nonNullCount="3" sum="33.0" sumSquares="365.0" variance="1.0"/> </Extension> </BayesInput>In PMML 4.2 or later a TargetValueStats element was added that should be used for continuous/numerical data. Currently we only support GaussianDistribution although the element also supports PoissonDistribution.
Modifier and Type | Field and Description |
---|---|
static String |
ATT_MEAN |
static String |
ATT_VARIANCE |
Constructor and Description |
---|
TargetStatistics(double sum,
double sumSquares,
long nonNullCount)
Creates a TargetStatistics object.
|
Modifier and Type | Method and Description |
---|---|
double |
getMean()
Returns the mean of the data values.
|
long |
getNonNullCount()
Returns the number of non-null data values.
|
double |
getSum()
Returns the sum of the data values.
|
double |
getSumSquares()
Returns the sum of the squares of the data values.
|
double |
getVariance()
Returns the sample variance of the data values.
|
public static final String ATT_MEAN
public static final String ATT_VARIANCE
public TargetStatistics(double sum, double sumSquares, long nonNullCount)
sum
- The sum of the data values.sumSquares
- The sum of the squares of the data values.nonNullCount
- The number of non-null values.public final double getSum()
public final double getSumSquares()
public long getNonNullCount()
public double getMean()
public double getVariance()
Copyright © 2019 Actian Corporation. All rights reserved.