Skip to main content
Version: v1.0.0

ml.evaluation.classification

module ml.evaluation.classification

The classification module allows users to evaluate and visualize classifiers


function evaluate_model#

evaluate_model(    fitted_model,    X_test: <built-in function array>,    y_test: <built-in function array>,    show_roc: bool = False) โ†’ <built-in function array>

Will predict and evaluate a model against a test set

Args:

  • `fitted_model` (model): The already fitted model to be tested. Sklearn and Keras models have been tested
  • `X_test` (np.array): The test set to calculate the predictions with
  • `y_test` (np.array): The output test set to evaluate the predictions against
  • `show_roc` (bool): This will plot the ROC curve in case of a binary classifier

Returns:

  • `np.array`: The predicted (y_pred) values against the model

function plot_roc_curve#

plot_roc_curve(    y_pred: <built-in function array>,    y_test: <built-in function array>)

Will plot the Receiver Operating Characteristic (ROC) Curve for binary classifiers

Args:

  • `y_pred` (np.array): The predicted values of the test set
  • `y_test` (np.array): The actual outputs of the test set

Returns:

  • `float`: The ROC_AUC value

This file was automatically generated via lazydocs.