public class BinaryClassificationPointwiseMetricStatsAggregator<L extends Serializable> extends Object implements MetricStatsAggregator<L,BinaryClassificationEvaluationContext<L>,BinaryClassificationPointwiseMetricStatsAggregator<L>>
Modifier and Type | Class and Description |
---|---|
static class |
BinaryClassificationPointwiseMetricStatsAggregator.WithCustomLabelsAggregator<L extends Serializable>
Class represents already initialized aggregator.
|
Constructor and Description |
---|
BinaryClassificationPointwiseMetricStatsAggregator()
Creates an instance of BinaryClassificationPointwiseMetricStatsAggregator.
|
BinaryClassificationPointwiseMetricStatsAggregator(L falseLabel,
L truthLabel,
int truePositive,
int falsePositive,
int trueNegative,
int falseNegative)
Creates an instance of BinaryClassificationPointwiseMetricStatsAggregator.
|
Modifier and Type | Method and Description |
---|---|
void |
aggregate(IgniteModel<Vector,L> mdl,
LabeledVector<L> vector)
Aggregates statistics for metric computation given model and vector with answer.
|
BinaryClassificationEvaluationContext<L> |
createInitializedContext()
Returns initialized context.
|
L |
getFalseLabel()
Returns false label.
|
int |
getFalseNegative()
Returns false negatives count.
|
int |
getFalsePositive()
Returns false positives count.
|
int |
getN()
Returns number of elements in dataset.
|
int |
getTrueNegative()
Returns true negatives count.
|
int |
getTruePositive()
Returns true positives count.
|
L |
getTruthLabel()
Returns truth label.
|
void |
initByContext(BinaryClassificationEvaluationContext<L> ctx)
Inits this aggtegator by evaluation context.
|
BinaryClassificationPointwiseMetricStatsAggregator<L> |
mergeWith(BinaryClassificationPointwiseMetricStatsAggregator other)
Merges statistics of two aggregators to new aggreagator.
|
public BinaryClassificationPointwiseMetricStatsAggregator()
public BinaryClassificationPointwiseMetricStatsAggregator(L falseLabel, L truthLabel, int truePositive, int falsePositive, int trueNegative, int falseNegative)
falseLabel
- False label.truthLabel
- Truth label.truePositive
- True positives amount.falsePositive
- False positives amount.trueNegative
- True negatives amount.falseNegative
- False negatives amount.public void aggregate(IgniteModel<Vector,L> mdl, LabeledVector<L> vector)
aggregate
in interface MetricStatsAggregator<L extends Serializable,BinaryClassificationEvaluationContext<L extends Serializable>,BinaryClassificationPointwiseMetricStatsAggregator<L extends Serializable>>
mdl
- Model.vector
- Vector.public BinaryClassificationPointwiseMetricStatsAggregator<L> mergeWith(BinaryClassificationPointwiseMetricStatsAggregator other)
mergeWith
in interface MetricStatsAggregator<L extends Serializable,BinaryClassificationEvaluationContext<L extends Serializable>,BinaryClassificationPointwiseMetricStatsAggregator<L extends Serializable>>
other
- Other aggregator.public BinaryClassificationEvaluationContext<L> createInitializedContext()
createInitializedContext
in interface MetricStatsAggregator<L extends Serializable,BinaryClassificationEvaluationContext<L extends Serializable>,BinaryClassificationPointwiseMetricStatsAggregator<L extends Serializable>>
public void initByContext(BinaryClassificationEvaluationContext<L> ctx)
initByContext
in interface MetricStatsAggregator<L extends Serializable,BinaryClassificationEvaluationContext<L extends Serializable>,BinaryClassificationPointwiseMetricStatsAggregator<L extends Serializable>>
ctx
- Evaluation context.public L getFalseLabel()
public L getTruthLabel()
public int getTruePositive()
public int getFalsePositive()
public int getTrueNegative()
public int getFalseNegative()
public int getN()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.1 Release Date : December 9 2020