org.carrot2.output.metrics
Class PrecisionRecallMetricDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.output.metrics.IdealPartitioningBasedMetricDescriptor.AttributeBuilder
      extended by org.carrot2.output.metrics.PrecisionRecallMetricDescriptor.AttributeBuilder
Enclosing class:
PrecisionRecallMetricDescriptor

public static class PrecisionRecallMetricDescriptor.AttributeBuilder
extends IdealPartitioningBasedMetricDescriptor.AttributeBuilder

Attribute map builder for the PrecisionRecallMetric component. You can use this builder as a type-safe alternative to populating the attribute map using attribute keys.


Field Summary
 Map<String,Object> map
          The attribute map populated by this builder.
 
Constructor Summary
protected PrecisionRecallMetricDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 PrecisionRecallMetricDescriptor.AttributeBuilder clusters(List<Cluster> value)
           
 PrecisionRecallMetricDescriptor.AttributeBuilder documents(List<Document> value)
           
 PrecisionRecallMetricDescriptor.AttributeBuilder enabled(boolean value)
          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.
 
Methods inherited from class org.carrot2.output.metrics.IdealPartitioningBasedMetricDescriptor.AttributeBuilder
partitionIdFieldName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public final Map<String,Object> map
The attribute map populated by this builder.

Constructor Detail

PrecisionRecallMetricDescriptor.AttributeBuilder

protected PrecisionRecallMetricDescriptor.AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.

Method Detail

weightedAveragePrecision

public Double weightedAveragePrecision()
Average precision of the whole cluster set, weighted by cluster size.

See Also:
PrecisionRecallMetric.weightedAveragePrecision

weightedAverageRecall

public Double weightedAverageRecall()
Average recall of the whole cluster set, weighted by cluster size.

See Also:
PrecisionRecallMetric.weightedAverageRecall

weightedAverageFMeasure

public Double weightedAverageFMeasure()
Average F-measure of the whole cluster set, weighted by cluster size.

See Also:
PrecisionRecallMetric.weightedAverageFMeasure

precisionByPartition

public Map<Object,Double> precisionByPartition()
Precision by partition.

See Also:
PrecisionRecallMetric.precisionByPartition

recallByPartition

public Map<Object,Double> recallByPartition()
Recall by partition.

See Also:
PrecisionRecallMetric.recallByPartition

fMeasureByPartition

public Map<Object,Double> fMeasureByPartition()
F-measure by partition.

See Also:
PrecisionRecallMetric.fMeasureByPartition

enabled

public PrecisionRecallMetricDescriptor.AttributeBuilder enabled(boolean value)
Calculate F-measure.

See Also:
PrecisionRecallMetric.enabled

documents

public PrecisionRecallMetricDescriptor.AttributeBuilder documents(List<Document> value)
See Also:
PrecisionRecallMetric.documents

clusters

public PrecisionRecallMetricDescriptor.AttributeBuilder clusters(List<Cluster> value)
See Also:
PrecisionRecallMetric.clusters


Copyright (c) Dawid Weiss, Stanislaw Osinski