public class ClusteringEvaluator extends AbstractEvaluator<ClusterID,org.tribuo.clustering.evaluation.ClusteringMetric.Context,ClusteringEvaluation,ClusteringMetric>
Evaluator
for clustering using ClusterID
s.
If the dataset contains an unassigned cluster id (as generated by ClusteringFactory.getUnknownOutput()
)
then the evaluate methods will throw IllegalArgumentException
with an appropriate message.
Constructor and Description |
---|
ClusteringEvaluator() |
Modifier and Type | Method and Description |
---|---|
protected org.tribuo.clustering.evaluation.ClusteringMetric.Context |
createContext(Model<ClusterID> model,
List<Prediction<ClusterID>> predictions)
Create the context needed for evaluation.
|
protected ClusteringEvaluation |
createEvaluation(org.tribuo.clustering.evaluation.ClusteringMetric.Context context,
Map<MetricID<ClusterID>,Double> results,
EvaluationProvenance provenance)
Create an evaluation for the given results
|
protected Set<ClusteringMetric> |
createMetrics(Model<ClusterID> model)
Creates the appropriate set of metrics for this model, by querying for it's
OutputInfo . |
computeResults, evaluate, evaluate, evaluate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createOnlineEvaluator, evaluate
protected Set<ClusteringMetric> createMetrics(Model<ClusterID> model)
AbstractEvaluator
OutputInfo
.createMetrics
in class AbstractEvaluator<ClusterID,org.tribuo.clustering.evaluation.ClusteringMetric.Context,ClusteringEvaluation,ClusteringMetric>
model
- The model to inspect.protected org.tribuo.clustering.evaluation.ClusteringMetric.Context createContext(Model<ClusterID> model, List<Prediction<ClusterID>> predictions)
AbstractEvaluator
createContext
in class AbstractEvaluator<ClusterID,org.tribuo.clustering.evaluation.ClusteringMetric.Context,ClusteringEvaluation,ClusteringMetric>
model
- the model that will be evaluatedpredictions
- the predictions that will be evaluatedprotected ClusteringEvaluation createEvaluation(org.tribuo.clustering.evaluation.ClusteringMetric.Context context, Map<MetricID<ClusterID>,Double> results, EvaluationProvenance provenance)
AbstractEvaluator
createEvaluation
in class AbstractEvaluator<ClusterID,org.tribuo.clustering.evaluation.ClusteringMetric.Context,ClusteringEvaluation,ClusteringMetric>
context
- the context that was used to compute these resultsresults
- the resultsprovenance
- the provenance of the results (including information about the model and dataset)Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.