cta-observatory / protopipe

Prototype data analysis pipeline for the Cherenkov Telescope Array Observatory
https://protopipe.readthedocs.io/en/latest/
Other
5 stars 13 forks source link

Comparison with CTA-MARS: Energy estimation #92

Closed HealthyPear closed 2 years ago

HealthyPear commented 3 years ago

This issue is part of a project described in issue #24.

The following is a "real-time" list of points that are found to be differences between the pipelines using the comparison. Not all features are critical to recovering the missing performance, but all should be implemented (as more similar as possible) in order to allow their optional use when comparing different algorithms.


Currently, protopipe uses an Adaptive Boost Regressor based on a Decision Tree, while CTAMARS uses a Random Forest regressor.

This is not defined in the same way in ctapipe, not sure if we should add it this way, better wait to see if the difference in definition plays a role in the overall performance of the pipeline.

The last 3 features may require a small enhancement in the management of the features read from the configuration file and form the scripts which produce DL2 data (see #90)

Right now we get only the estimate but we should get also a measure of the variance from the trees estimates. This is used also in the weighting for the gammaness estimation for the DL2-candidate event.

From the wiki page of the CTAMARS analysis,

the RFs provide estimates for log10 E and its RMS, but the average is done after converting those to linear energy scale)

and now issue #139 is breaking this behaviour because this operation is performed on the base-10 logarithm scale!

This issue will be useful also for #93. Right now we weigh with Intensity, while CTAMARS uses 1/RMS^2 where RMS comes from each Random Forest regressor.

As shown here we have lost sensitivity at low energies (mainly due to the necessary changes between 0.3.0 and 0.4.0). Currently, it is not clear if with the previous 2 points this will be solved or it will require to fix/add something in DL1 and/or DL2a.

CTAMARS uses the whole gamma-1 and samples to train the classification model, whereas protopipe splits the original TRAINING data into train/test sub-samples. This allows applying intermediate benchmarking before applying the models to the rest of the analysis data sample (DL2 production takes more time and it could be convenient to make studies on the models without producing every time DL2 data). In the case of energy estimation, this could represent a minor problem than classification, in fact, the energy estimation benchmarks can be applied (as of 0.4.0) to the gamma-2 sample, which is used to train the classification model.