apply_models
- lstchain.reco.dl1_to_dl2.apply_models(dl1, classifier, reg_energy, reg_disp_vector=None, reg_disp_norm=None, cls_disp_sign=None, effective_focal_length=<Quantity 29.30565 m>, custom_config=None, interpolate_rf=None, training_pointings=None)
Apply previously trained Random Forests to a set of data depending on a set of features. The right set of disp models must be passed depending on the config.
- Parameters:
- dl1: `pandas.DataFrame`
- classifier: string | Path | bytes | sklearn.ensemble.RandomForestClassifier
Path to the random forest filename or file or pre-loaded RandomForestClassifier object for Gamma/Hadron separation
- reg_energy: string | Path | bytes | sklearn.ensemble.RandomForestRegressor
Path to the random forest filename or file or pre-loaded RandomForestRegressor object for Energy reconstruction
- reg_disp_vector: string | Path | bytes | sklearn.ensemble.RandomForestRegressor
Path to the random forest filename or file or pre-loaded RandomForestRegressor object for disp vector reconstruction
- reg_disp_norm: string | Path | bytes | sklearn.ensemble.RandomForestRegressor
Path to the random forest filename or file or pre-loaded RandomForestRegressor object for disp norm reconstruction
- cls_disp_sign: string | Path | bytes | sklearn.ensemble.RandomForestClassifier
Path to the random forest filename or file or pre-loaded RandomForestClassifier object for disp sign reconstruction
- effective_focal_length: `astropy.unit`
- custom_config: dictionary
Modified configuration to update the standard one
- interpolate_rfdict
Contains three booleans, ‘energy_regression’, ‘particle_classification’, ‘disp’, indicating which RF predictions should be interpolated linearly in cos(zenith).
- training_pointingsastropy.table.Table
Table with azimuth (az), zenith (zd) pointings of the MC sample used in the training. Needed for the interpolation of RF predictions.
- Returns:
- pandas.DataFrame
dataframe including reconstructed dl2 features