sklearn.metrics.log_loss is an implementation of the error metric, as it is usually defined, and which, like most error metrics, is a positive number. In this case, this is an indicator that is usually minimized (for example, as the standard error of the regression), in contrast to indicators, such as accuracy, which is maximized.
Therefore, neg_log_loss is a technical component for creating a utility value that allows you to optimize sklearn functions and classes to maximize this utility without having to change the function behavior for each metric (for example, with the names cross_val_score , GridSearchCV , RandomizedSearchCV and others).
source share