EnergyRegressor#

class magicctapipe.reco.EnergyRegressor(settings={}, features=[], use_unsigned_features=None)[source]#

Bases: object

RF regressors to reconstruct the energies of primary particles.

Parameters:
settingsdict

Settings of RF regressors

featureslist

Parameters for training RFs

use_unsigned_featuresbool

If True, it trains RFs with unsigned features

Methods Summary

fit(event_data)

Train a RF for every telescope.

load(input_file)

Loads trained RFs from a joblib file.

predict(event_data)

Reconstructs the energies of primary particles with trained RFs.

save(output_file)

Saves trained RFs in a joblib file.

Methods Documentation

fit(event_data)[source]#

Train a RF for every telescope.

Parameters:
event_datapandas.core.frame.DataFrame

Data frame of shower events

load(input_file)[source]#

Loads trained RFs from a joblib file.

Parameters:
input_filestr

Path to an input joblib file

predict(event_data)[source]#

Reconstructs the energies of primary particles with trained RFs.

Parameters:
event_datapandas.core.frame.DataFrame

Data frame of shower events

Returns:
pandas.core.frame.DataFrame

Data frame of the shower events with reconstructed energies

save(output_file)[source]#

Saves trained RFs in a joblib file.

Parameters:
output_filestr

Path to an output joblib file