DispReconstructor#
- class ctapipe.reco.sklearn.DispReconstructor(**kwargs: Any)[source]#
 Bases:
ReconstructorPredict absolute value and sign for disp origin reconstruction and convert to altitude and azimuth prediction for each telescope.
Attributes Summary
Features to use for both models.
If given, load serialized model from this path.
If True, the norm(disp) model is trained to predict ln(norm(disp)) and the output is
prefix_parameter=sign_prediction*exp(norm_prediction).Which scikit-learn regression model to use.
kwargs for the sklearn regressor.
Prefix for the output of this model.
Which scikit-learn classification model to use.
kwargs for the sklearn classifier.
Which stereo combination method to use.
Methods Summary
__call__(event)Event-wise prediction for the EventSource-Loop.
fit(key, table)Create and fit new models for
keyusing the data intable.predict_table(key, table)Predict on a table of events.
read(path, **kwargs)Read a joblib-pickled reconstructor from
pathwrite(path[, overwrite])Attributes Documentation
- features#
 Features to use for both models.
- instrument_table#
 
- load_path#
 If given, load serialized model from this path.
- log_target#
 If True, the norm(disp) model is trained to predict ln(norm(disp)) and the output is
prefix_parameter=sign_prediction*exp(norm_prediction).
- norm_cls#
 Which scikit-learn regression model to use.
- norm_config#
 kwargs for the sklearn regressor.
- prefix#
 Prefix for the output of this model. If None,
dispis used.
- sign_cls#
 Which scikit-learn classification model to use.
- sign_config#
 kwargs for the sklearn classifier.
- stereo_combiner_cls#
 Which stereo combination method to use.. Possible values: []
- target = 'true_disp'#
 
Methods Documentation
- __call__(event: ArrayEventContainer) None[source]#
 Event-wise prediction for the EventSource-Loop.
Fills the event.dl2.tel[tel_id].disp[prefix] container and event.dl2.tel[tel_id].geometry[prefix] container.
- Parameters:
 - event: ArrayEventContainer
 
- predict_table(key, table: Table) dict[ReconstructionProperty, Table][source]#
 Predict on a table of events.
- classmethod read(path, **kwargs)[source]#
 Read a joblib-pickled reconstructor from
path- Parameters:
 - pathstr or pathlib.Path
 Path to a Reconstructor instance pickled using joblib
- parentNone or Component or Tool
 Attach a new parent to the loaded class, this will properly
- subarraySubarrayDescription
 Attach a new subarray to the loaded reconstructor A warning will be raised if the telescope types of the subarray stored in the pickled class do not match with the provided subarray.
- **kwargs are set on the loaded instance
 
- Returns:
 - Reconstructor instance loaded from file