ctapipe is not stable yet, so expect large and rapid changes to structure and functionality as we explore various design choices before the 1.0 release.

ParticleClassifier#

class ctapipe.reco.sklearn.ParticleClassifier(**kwargs: Any)[source]#

Bases: SKLearnClassificationReconstructor

Predict dl2 particle classification.

Attributes Summary

positive_class

Particle id (in simtel system) of the positive class.

property

Property predicted, overridden in subclass.

target

Name of the target table column for training.

Methods Summary

__call__(event)

Event-wise prediction for the EventSource-Loop.

predict_table(key, table)

Predict on a table of events.

Attributes Documentation

positive_class#

Particle id (in simtel system) of the positive class. Default is 0 for gammas.

property = 4#

Property predicted, overridden in subclass.

target: str = 'true_shower_primary_id'#

Name of the target table column for training.

Methods Documentation

__call__(event: ArrayEventContainer) None[source]#

Event-wise prediction for the EventSource-Loop.

Fills the event.dl2.<your-feature>[name] container.

Parameters:
event: ArrayEventContainer
predict_table(key, table: Table) dict[ReconstructionProperty, Table][source]#

Predict on a table of events.

Parameters:
keyHashable

Key of the model. Currently always a TelescopeDescription as we train models per telescope type.

tableTable

Table of features

Returns:
tableTable

Table(s) with predictions, matches the corresponding container definition(s)