@Bindable public class PrecisionRecallMetric extends IdealPartitioningBasedMetric
Metrics will be calculated only if all input documents have non-blank
Document.PARTITIONS.
| Modifier and Type | Field and Description |
|---|---|
static String |
BEST_F_MEASURE_PARTITION
Partition on which the cluster achieved best F-Score value.
|
List<Cluster> |
clusters |
List<Document> |
documents |
boolean |
enabled
Calculate F-measure.
|
Map<Object,Double> |
fMeasureByPartition
F-measure by partition.
|
Map<Object,Double> |
precisionByPartition
Precision by partition.
|
Map<Object,Double> |
recallByPartition
Recall by partition.
|
Double |
weightedAverageFMeasure
Average F-measure of the whole cluster set, weighted by cluster size.
|
Double |
weightedAveragePrecision
Average precision of the whole cluster set, weighted by cluster size.
|
Double |
weightedAverageRecall
Average recall of the whole cluster set, weighted by cluster size.
|
partitionIdFieldName| Constructor and Description |
|---|
PrecisionRecallMetric() |
| Modifier and Type | Method and Description |
|---|---|
void |
calculate()
Triggers calculation of the metric.
|
boolean |
isEnabled()
Return
true if this metric should be calculated. |
public static final String BEST_F_MEASURE_PARTITION
Object. See Document.PARTITIONS for more information.@Processing @Output @Attribute public Double weightedAveragePrecision
@Processing @Output @Attribute public Double weightedAverageRecall
@Processing @Output @Attribute public Double weightedAverageFMeasure
@Processing @Output @Attribute public Map<Object,Double> precisionByPartition
@Processing @Output @Attribute public Map<Object,Double> recallByPartition
@Processing @Output @Attribute public Map<Object,Double> fMeasureByPartition
@Processing @Input @Attribute public boolean enabled
@Processing @Input @Attribute(key="documents") public List<Document> documents
@Processing @Input @Attribute(key="clusters") public List<Cluster> clusters
public void calculate()
IClusteringMetricProcessing Input attributes
will have been bound before a call to this method.public boolean isEnabled()
IClusteringMetrictrue if this metric should be calculated.