AI-multimodal / aimmdb

BSD 3-Clause "New" or "Revised" License
0 stars 10 forks source link

Add outlier rejection to postprocessing operations #54

Open CharlesC30 opened 1 year ago

CharlesC30 commented 1 year ago

Denis also requested we add outlier rejection to postprocessing. This could be incorporated into an AverageData operator, or there could be two separate operators for averaging with/without outlier rejection.

Determining outliers

First the trimmed mean and trimmed standard deviation will be calculated at each energy point (see here). For each spectrum the following will be then be calculated: 1 / number of energy points * sum[(trimmed_mean - spectrum / trimmed_stddev)**2] This value is essentially a measure of how many trimmed standard deviations the spectrum typically deviates from the trimmed mean, and it can be compared to a threshold to determine if a given spectrum is an outlier in the group.

A few notes from Denis:

matthewcarbone commented 1 year ago

Not entirely sure I understand what the trimmed_mean and trimmed_stddev are, but I'll follow your lead on this. Thanks for documenting and linking to some resources, I'll take a look. Keep me updated!