RegressorDiagnostic#

class protopipe.benchmarks.RegressorDiagnostic(model, feature_name_list, target_name, is_target_log, data_train, data_test, output_name, estimation_weight)[source]#

Bases: protopipe.benchmarks.plot.ModelDiagnostic

Class to plot several diagnostic plots for regression.

Parameters
model: sklearn.base.BaseEstimator

Scikit model

feature_name_list: str

List of features

target_name: str

Name of target (e.g. mc_energy)

data_train: `~pandas.DataFrame`

Data frame

data_test: `~pandas.DataFrame`

Data frame

Methods Summary

add_image_model_output(data)

plot_resolution_distribution(ax, y_true, y_reco)

Compute bias and resolution with a gaussian fit and return a plot with the fit results and the migration distribution.

Methods Documentation

add_image_model_output(data)[source]#
static plot_resolution_distribution(ax, y_true, y_reco, nbin=100, fit_range=[- 3, 3], fit_kwargs={}, hist_kwargs={})[source]#

Compute bias and resolution with a gaussian fit and return a plot with the fit results and the migration distribution.