mloptimizer.evaluation.evaluator
#
Module Contents#
Classes#
Evaluator class to evaluate the performance of a classifier |
- class mloptimizer.evaluation.evaluator.Evaluator(features: numpy.array, labels: numpy.array, eval_function, fitness_score='accuracy', metrics=None, tracker: mloptimizer.aux.Tracker = None, individual_utils=None)[source]#
Evaluator class to evaluate the performance of a classifier
- Parameters:
features (array-like) – The features to use to evaluate the classifier
labels (array-like) – The labels to use to evaluate the classifier
eval_function (function) – The evaluation function to use to evaluate the performance of the classifier
fitness_score (str) – The fitness score to use to evaluate the performance of the classifier
metrics (dict) – The metrics to use to evaluate the performance of the classifier Dictionary of the form {“metric_name”: metric_function}
tracker (Tracker) – The tracker to use to log the evaluations
individual_utils (IndividualUtils) – The individual utils to use to get the classifier from the individual
- evaluate(clf, features, labels)[source]#
Evaluate the performance of a classifier
- Parameters:
clf (object) – The classifier to evaluate
features (array-like) – The features to use to evaluate the classifier
labels (array-like) – The labels to use to evaluate the classifier
- Returns:
metrics – Dictionary of the form {“metric_name”: metric_value}
- Return type:
dict