Uses of Class
org.tribuo.evaluation.metrics.MetricTarget
Packages that use MetricTarget
Package
Description
Evaluation classes for anomaly detection.
Evaluation classes for multi-class classification.
Evaluation classes for clustering.
This package contains the infrastructure classes for building evaluation metrics.
Evaluation classes for multi-label classification using
MultiLabel
.Evaluation classes for single or multi-dimensional regression.
-
Uses of MetricTarget in org.tribuo.anomaly.evaluation
Methods in org.tribuo.anomaly.evaluation that return MetricTargetConstructors in org.tribuo.anomaly.evaluation with parameters of type MetricTargetModifierConstructorDescriptionAnomalyMetric
(MetricTarget<Event> target, String name, ToDoubleBiFunction<MetricTarget<Event>, org.tribuo.anomaly.evaluation.AnomalyMetric.Context> impl) Creates an anomaly detection metric, with a specific name, using the supplied evaluation function.Constructor parameters in org.tribuo.anomaly.evaluation with type arguments of type MetricTargetModifierConstructorDescriptionAnomalyMetric
(MetricTarget<Event> target, String name, ToDoubleBiFunction<MetricTarget<Event>, org.tribuo.anomaly.evaluation.AnomalyMetric.Context> impl) Creates an anomaly detection metric, with a specific name, using the supplied evaluation function. -
Uses of MetricTarget in org.tribuo.classification.evaluation
Methods in org.tribuo.classification.evaluation that return MetricTargetMethods in org.tribuo.classification.evaluation that return types with arguments of type MetricTargetModifier and TypeMethodDescriptionLabelMetrics.getImpl()
Returns the implementing function for this metric.Methods in org.tribuo.classification.evaluation with parameters of type MetricTargetModifier and TypeMethodDescriptionstatic <T extends Classifiable<T>>
doubleConfusionMetrics.accuracy
(MetricTarget<T> target, ConfusionMatrix<T> cm) Calculates the accuracy given this confusion matrix.static double
LabelMetrics.AUCROC
(MetricTarget<Label> tgt, List<Prediction<Label>> predictions) Area under the ROC curve.static double
LabelMetrics.averagedPrecision
(MetricTarget<Label> tgt, List<Prediction<Label>> predictions) static <T extends Classifiable<T>>
doubleConfusionMetrics.f1
(MetricTarget<T> tgt, ConfusionMatrix<T> cm) Computes the F_1 score.static <T extends Classifiable<T>>
doubleConfusionMetrics.fn
(MetricTarget<T> tgt, ConfusionMatrix<T> cm) Returns the number of false negatives, possibly averaged depending on the metric target.LabelMetrics.forTarget
(MetricTarget<Label> tgt) Gets the LabelMetric wrapped around the supplied MetricTarget.static <T extends Classifiable<T>>
doubleConfusionMetrics.fp
(MetricTarget<T> tgt, ConfusionMatrix<T> cm) Returns the number of false positives, possibly averaged depending on the metric target.static <T extends Classifiable<T>>
doubleConfusionMetrics.fscore
(MetricTarget<T> tgt, ConfusionMatrix<T> cm, double beta) Computes the Fscore.static <T extends Classifiable<T>>
doubleConfusionMetrics.precision
(MetricTarget<T> tgt, ConfusionMatrix<T> cm) Calculates the precision for this metric target.static <T extends Classifiable<T>>
doubleConfusionMetrics.recall
(MetricTarget<T> tgt, ConfusionMatrix<T> cm) Calculates the recall for this metric target.static <T extends Classifiable<T>>
doubleConfusionMetrics.tn
(MetricTarget<T> tgt, ConfusionMatrix<T> cm) Returns the number of true negatives, possibly averaged depending on the metric target.static <T extends Classifiable<T>>
doubleConfusionMetrics.tp
(MetricTarget<T> tgt, ConfusionMatrix<T> cm) Returns the number of true positives, possibly averaged depending on the metric target.Constructors in org.tribuo.classification.evaluation with parameters of type MetricTargetModifierConstructorDescriptionLabelMetric
(MetricTarget<Label> tgt, String name, ToDoubleBiFunction<MetricTarget<Label>, LabelMetric.Context> impl) Construct a newLabelMetric
for the supplied metric target, using the supplied function.Constructor parameters in org.tribuo.classification.evaluation with type arguments of type MetricTargetModifierConstructorDescriptionLabelMetric
(MetricTarget<Label> tgt, String name, ToDoubleBiFunction<MetricTarget<Label>, LabelMetric.Context> impl) Construct a newLabelMetric
for the supplied metric target, using the supplied function. -
Uses of MetricTarget in org.tribuo.clustering.evaluation
Methods in org.tribuo.clustering.evaluation that return MetricTargetMethods in org.tribuo.clustering.evaluation that return types with arguments of type MetricTargetModifier and TypeMethodDescriptionBiFunction<MetricTarget<ClusterID>,
org.tribuo.clustering.evaluation.ClusteringMetric.Context, Double> ClusteringMetrics.getImpl()
Gets the implementing function for this metric.Methods in org.tribuo.clustering.evaluation with parameters of type MetricTargetModifier and TypeMethodDescriptionClusteringMetrics.forTarget
(MetricTarget<ClusterID> tgt) Constructs the metric for the specified metric target.Constructors in org.tribuo.clustering.evaluation with parameters of type MetricTargetModifierConstructorDescriptionClusteringMetric
(MetricTarget<ClusterID> target, String name, BiFunction<MetricTarget<ClusterID>, org.tribuo.clustering.evaluation.ClusteringMetric.Context, Double> impl) Constructs a clustering metric using the supplied parameters.Constructor parameters in org.tribuo.clustering.evaluation with type arguments of type MetricTargetModifierConstructorDescriptionClusteringMetric
(MetricTarget<ClusterID> target, String name, BiFunction<MetricTarget<ClusterID>, org.tribuo.clustering.evaluation.ClusteringMetric.Context, Double> impl) Constructs a clustering metric using the supplied parameters. -
Uses of MetricTarget in org.tribuo.evaluation.metrics
Methods in org.tribuo.evaluation.metrics that return MetricTargetModifier and TypeMethodDescriptionEvaluationMetric.getTarget()
The target for this metric instance.static <U extends Output<U>>
MetricTarget<U>MetricTarget.macroAverageTarget()
Get the singletonMetricTarget
which contains theEvaluationMetric.Average.MACRO
.static <U extends Output<U>>
MetricTarget<U>MetricTarget.microAverageTarget()
Get the singletonMetricTarget
which contains theEvaluationMetric.Average.MICRO
.Constructors in org.tribuo.evaluation.metrics with parameters of type MetricTargetModifierConstructorDescriptionMetricID
(MetricTarget<T> target, String metricName) Constructs a metric id. -
Uses of MetricTarget in org.tribuo.multilabel.evaluation
Methods in org.tribuo.multilabel.evaluation that return MetricTargetMethods in org.tribuo.multilabel.evaluation that return types with arguments of type MetricTargetModifier and TypeMethodDescriptionBiFunction<MetricTarget<MultiLabel>,
org.tribuo.multilabel.evaluation.MultiLabelMetric.Context, Double> MultiLabelMetrics.getImpl()
Get the implementation function for this metric.Methods in org.tribuo.multilabel.evaluation with parameters of type MetricTargetModifier and TypeMethodDescriptionMultiLabelMetrics.forTarget
(MetricTarget<MultiLabel> tgt) Get the metric for the supplied target.Constructors in org.tribuo.multilabel.evaluation with parameters of type MetricTargetModifierConstructorDescriptionMultiLabelMetric
(MetricTarget<MultiLabel> target, String name, BiFunction<MetricTarget<MultiLabel>, org.tribuo.multilabel.evaluation.MultiLabelMetric.Context, Double> impl) Constructs a multi-label metric.Constructor parameters in org.tribuo.multilabel.evaluation with type arguments of type MetricTargetModifierConstructorDescriptionMultiLabelMetric
(MetricTarget<MultiLabel> target, String name, BiFunction<MetricTarget<MultiLabel>, org.tribuo.multilabel.evaluation.MultiLabelMetric.Context, Double> impl) Constructs a multi-label metric. -
Uses of MetricTarget in org.tribuo.regression.evaluation
Methods in org.tribuo.regression.evaluation that return MetricTargetMethods in org.tribuo.regression.evaluation with parameters of type MetricTargetModifier and TypeMethodDescriptionstatic double
RegressionMetrics.explainedVariance
(MetricTarget<Regressor> target, RegressionSufficientStatistics sufficientStats) Calculates the explained variance based on the supplied statistics.static double
RegressionMetrics.mae
(MetricTarget<Regressor> target, RegressionSufficientStatistics sufficientStats) Calculates the Mean Absolute Error based on the supplied statistics.static double
RegressionMetrics.r2
(MetricTarget<Regressor> target, RegressionSufficientStatistics sufficientStats) Calculates R^2 based on the supplied statistics.static double
RegressionMetrics.rmse
(MetricTarget<Regressor> target, RegressionSufficientStatistics sufficientStats) Calculates the RMSE based on the supplied statistics.Constructors in org.tribuo.regression.evaluation with parameters of type MetricTargetModifierConstructorDescriptionRegressionMetric
(MetricTarget<Regressor> tgt, String name, ToDoubleBiFunction<MetricTarget<Regressor>, org.tribuo.regression.evaluation.RegressionMetric.Context> impl) Construct a newRegressionMetric
for the supplied metric target, using the supplied function.RegressionMetric
(MetricTarget<Regressor> tgt, String name, ToDoubleBiFunction<MetricTarget<Regressor>, org.tribuo.regression.evaluation.RegressionMetric.Context> impl, boolean useExampleWeights) Construct a newRegressionMetric
for the supplied metric target, using the supplied function.Constructor parameters in org.tribuo.regression.evaluation with type arguments of type MetricTargetModifierConstructorDescriptionRegressionMetric
(MetricTarget<Regressor> tgt, String name, ToDoubleBiFunction<MetricTarget<Regressor>, org.tribuo.regression.evaluation.RegressionMetric.Context> impl) Construct a newRegressionMetric
for the supplied metric target, using the supplied function.RegressionMetric
(MetricTarget<Regressor> tgt, String name, ToDoubleBiFunction<MetricTarget<Regressor>, org.tribuo.regression.evaluation.RegressionMetric.Context> impl, boolean useExampleWeights) Construct a newRegressionMetric
for the supplied metric target, using the supplied function.