This function takes a grid search object, test data, and test labels to evaluate the performance of the best model found during grid search.
evaluate_test_metrics(grid_search, X_test, y_test, modules)
A list containing key performance metrics of the best model: - @field precision: The weighted precision score. - @field recall: The weighted recall score. - @field f1: The weighted F1 score. - @field accuracy: The overall accuracy score. These metrics are crucial for evaluating the effectiveness of the model on test data.
A grid search object containing the best estimator.
A data frame or matrix of test features.
A vector of test labels.
A list of Python modules used in the function.