Class AnomalyEvaluator
java.lang.Object
org.tribuo.evaluation.AbstractEvaluator<Event, org.tribuo.anomaly.evaluation.AnomalyMetric.Context, AnomalyEvaluation, AnomalyMetric>
org.tribuo.anomaly.evaluation.AnomalyEvaluator
- All Implemented Interfaces:
Evaluator<Event, AnomalyEvaluation>
public class AnomalyEvaluator
extends AbstractEvaluator<Event, org.tribuo.anomaly.evaluation.AnomalyMetric.Context, AnomalyEvaluation, AnomalyMetric>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.tribuo.anomaly.evaluation.AnomalyMetric.ContextcreateContext(Model<Event> model, List<Prediction<Event>> predictions) Create the context needed for evaluation.protected AnomalyEvaluationcreateEvaluation(org.tribuo.anomaly.evaluation.AnomalyMetric.Context context, Map<MetricID<Event>, Double> results, EvaluationProvenance provenance) Create an evaluation for the given resultsprotected Set<AnomalyMetric> createMetrics(Model<Event> model) Creates the appropriate set of metrics for this model, by querying for it'sOutputInfo.Methods inherited from class org.tribuo.evaluation.AbstractEvaluator
computeResults, evaluate, evaluate, evaluateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tribuo.evaluation.Evaluator
createOnlineEvaluator, evaluate
-
Constructor Details
-
AnomalyEvaluator
public AnomalyEvaluator()
-
-
Method Details
-
createMetrics
Description copied from class:AbstractEvaluatorCreates the appropriate set of metrics for this model, by querying for it'sOutputInfo.- Specified by:
createMetricsin classAbstractEvaluator<Event, org.tribuo.anomaly.evaluation.AnomalyMetric.Context, AnomalyEvaluation, AnomalyMetric>- Parameters:
model- The model to inspect.- Returns:
- The set of metrics.
-
createContext
protected org.tribuo.anomaly.evaluation.AnomalyMetric.Context createContext(Model<Event> model, List<Prediction<Event>> predictions) Description copied from class:AbstractEvaluatorCreate the context needed for evaluation. The context might store global properties or cache computation.- Specified by:
createContextin classAbstractEvaluator<Event, org.tribuo.anomaly.evaluation.AnomalyMetric.Context, AnomalyEvaluation, AnomalyMetric>- Parameters:
model- the model that will be evaluatedpredictions- the predictions that will be evaluated- Returns:
- the context for this model and its predictions
-
createEvaluation
protected AnomalyEvaluation createEvaluation(org.tribuo.anomaly.evaluation.AnomalyMetric.Context context, Map<MetricID<Event>, Double> results, EvaluationProvenance provenance) Description copied from class:AbstractEvaluatorCreate an evaluation for the given results- Specified by:
createEvaluationin classAbstractEvaluator<Event, org.tribuo.anomaly.evaluation.AnomalyMetric.Context, AnomalyEvaluation, AnomalyMetric>- Parameters:
context- the context that was used to compute these resultsresults- the resultsprovenance- the provenance of the results (including information about the model and dataset)- Returns:
- the evaluation
-