magic-cta-pipe is under active development. Expect large and rapid changes in functionality.

EventClassifier#

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

Bases: object

RF classifiers to reconstruct the gammaness.

Parameters:
settingsdict

Settings of RF classifiers

featureslist

Parameters for training RFs

use_unsigned_featuresbool

If True, it trains RFs with unsigned features

Methods Summary

fit(event_data)

Trains a RF for every telescope.

load(input_file)

Loads trained RFs from a joblib file.

predict(event_data)

Reconstructs the gammaness.

save(output_file)

Saves trained RFs in a joblib file.

Methods Documentation

fit(event_data)[source]#

Trains 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 gammaness.

Parameters:
event_datapandas.core.frame.DataFrame

Data frame of shower events

Returns:
pandas.core.frame.DataFrame

Data frame of the shower events with the gammaness

save(output_file)[source]#

Saves trained RFs in a joblib file.

Parameters:
output_filestr

Path to an output joblib file