algocomponents.tasks.evaluate_prediction
Submodules
algocomponents.tasks.evaluate_prediction.evaluate_prediction
- class algocomponents.tasks.evaluate_prediction.evaluate_prediction.EvaluatePrediction(input_table: str, output_table: str, prediction_column: str, target_label_column: str, **kwargs)
Bases:
SQLPipelineA task to evaluate a prediction done by a model.
The task takes an input table with a prediction column and a target label column. The task calculates different evaluation metrics such as: true positives, false positives, true negatives, false negatives, accuracy, precision, recall, f1 score for different threshold boundaries.
- Parameters:
input_table – Table where model predictions and target labels exists.
output_table – Table where results should be put.
prediction_column – Column in input table for model predictions.
target_label_column – Column in input table for model target label.
- create_thresholds(n_thresholds) str
Creates a query that produces a table with n_thresholds.
- Parameters:
n_thresholds – How many thresholds, or how many rows, to produce.
- Returns:
The query for creating n thresholds.