ScoringMonitorLog#

class sklearn.callback.ScoringMonitorLog(run_id: UUID, estimator_name: str, timestamp: datetime, data: list[dict])[source]#

Log for one run of a scoring monitor.

The recorded scores are accessed through the data attribute, as a list of dicts, or the data_as_pandas attribute, as a Pandas DataFrame. In the former case, each dict corresponds to one row of the corresponding DataFrame and contains column_name -> value pairs. The columns are structured as follows:

  • task_id_path: tuple containing the task ids from the root task to the task for which the score was computed. Each value in this column is unique.

  • parent_task_id_path: tuple containing the task ids from the root to the parent task. It can be used to group scores from tasks that have the same parent task.

  • estimator_name: the name of the estimator.

  • task_name: the name of the task.

  • task_id: the id of the task.

  • sequential_subtasks: whether the task has sequential subtasks.

  • A column for each score name that was passed as scoring parameter.

Attributes:
run_iduuid.UUID

The unique identifier for the run.

estimator_namestr

The name of the estimator for the run.

timestampdatetime.datetime

The timestamp of the start of the run.

datalist[dict]

The recorded scores for the run.

data_as_pandaspandas.DataFrame

The recorded scores for the run as a Pandas DataFrame.