prepare_data#

protopipe.mva.prepare_data(ds, derived_features, cuts, select_data=True, label=None)[source]#

Add custom variables to the input data and optionally select it.

Parameters
dspandas.DataFrame

Input data not yet selected.

derived_features: dict

Dictionary of more complex featuresread from the configuration file.

cuts: str

Fiducial cuts from protopipe.mva.utils.make_cut_list

select_data: bool

If True apply cuts to the final dataframe.

label: str

Name of the classifier target label if any.

Returns
dspandas.DataFrame

Input data integrated with new variables and optionally selected for the fiducial cuts.