phishbench.evaluation¶
The evaluation module evaluates classifiers against a test set.
-
phishbench.evaluation.evaluate_classifiers(classifiers, x_test, y_test, verbose=1)¶ Evaluates a set of classifiers
- Parameters
classifiers (A list of
BaseClassifierobjects) – The classifiers to evaluatex_test (array-like of shape (n_samples, n_features)) – The feature vectors of the test set.
y_test (array-like of shape (n_samples)) – The labels of the test set with
0being legitimate and1being phishingverbose (bool) –
Whether or not to print progress to stdout.
0prints nothing.1prints the classifiers being trained
- Returns
The metrics of the classifiers.
- Return type
A pandas
DataFrame
-
phishbench.evaluation.evaluate_classifier(classifier, x_test, y_test)¶ Evaluates a single classifier
- Parameters
classifier (A
BaseClassifierobject) – The classifier to evaluate.x_test (array-like of shape (n_samples, n_features)) – The test features to evaluate with
y_test (array-like of shape (n_samples)) – The test labels to evaluate with
- Returns
A dictionary mapping name of the metric to the corresponding score.
- Return type
Dict[str, float]