question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unify mask handling in Dataset methods and Estimators

See original GitHub issue

We have to unify the handling of mask_safe and mask_fit in the dataset methods and Estimator classes. Here is the current behaviour:

Dataset methods:

  • MapDataset.stack(), SpectrumDataset.stack(): takes into account mask_safe
  • MapDataset.to_image(): takes into account mask_safe
  • MapDataset.to_spectrum_dataset(): no mask handling
  • MapDataset.resample_energy_axis(): takes into account mask_safe

Estimator classes:

  • Fit: takes into account mask_safe as well as mask_fit
  • FluxPointsEstimator: takes into account mask_safe as well as mask_fit
  • LightCurveEstimator: takes into account mask_safe as well as mask_fit
  • TSMapEstimator: no mask handling
  • ExcessMapEstimator: takes mask_safe into account, optionally the mask_fit as well
  • ExcessProfileEstimator: no mask handling (related to .to_spectrum_dataset())

Maker classes:

  • FoVBackgroundMaker: just uses the exclusion_mask parameter, see #2921.

My current proposal goes into the direction of just applying mask_fit and mask_safe everywhere, except maybe for MapDataset.stack(), but I’ll think about once more. Please add your thoughts @registerrier , @AtreyeeS, @luca-giunti .

Related issues:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
adonathcommented, Sep 30, 2020

I’d be open to handle the mask_fit as well in dataset methods, it would unify the behaviour 100% and offers a bit more flexibility as @luca-giunti suggested…

0reactions
adonathcommented, Nov 18, 2021

From a quick check this looks all good now in Gammapy, except for one oddity: the ExcessMapEstimator exposes an option apply_mask_fit, which allows to control the behavior. None of the other estimators does this and one could easily achieve the same behavior using:

dataset.mask_fit = None

My recommendation would be to remove the apply_mask_fit option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Face mask detection using deep learning: An approach to ...
In this work, a deep learning based model for detecting masks over faces in public place to curtail community spread of Coronavirus is...
Read more >
1.11. Ensemble methods — scikit-learn 1.2.0 documentation
The goal of ensemble methods is to combine the predictions of several base estimators built with a given learning algorithm in order to...
Read more >
A data-driven missing value imputation approach for ...
Longitudinal datasets of human ageing studies usually have a high volume of missing data, and one way to handle missing values in a...
Read more >
arXiv:1911.07771v2 [cs.CV] 18 Mar 2020
the masks on the neural network that estimates the 6D pose of an object ... AUC metric on YCB-Video Dataset, which is an...
Read more >
a unified platform for missing values methods and workflows
complete or incomplete datasets. This is useful when performing simulations to compare methods that impute or handle missing data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found