Normalize data without influence from outliers

4 visualizzazioni (ultimi 30 giorni)
I have some time vs. voltage data that I would like to normalize, but there are some voltage outliers. The outlier peaks are meaningful and I do not want to remove them. Is there any way to normalize the data without influence from the outliers in the calculation? I want the "steady state" in my data to be around 0, and I still want to determine the Z score of those voltage peaks based on the normalization of data around the steady state.
The way I'm doing it now is gathering another set of data without the peaks, finding the mean and SD, and then manually using that to normalize the data with the peaks. It works but it is not very elegant. Is there a better way?

Risposta accettata

the cyclist
the cyclist il 20 Mag 2013
Modificato: the cyclist il 20 Mag 2013
Molly,
I think the devil is in the details here, and you haven't shown us any code. The approach will depend on whether this is a one-off solution. Do you need this code to determine the outlier cutoff automatically, or you can just hard-code it this one time?
So, for example, if your voltage data are in a variable called voltageData, then you could identify the outliers with an boolean index
outlierIndex = (voltageData>137); % Hard-coded voltage outlier definition
and then use that index to exclude some data from other calculations:
meanVoltageWithoutOutlier = mean(voltageData(not(outlierIndex)));
etc.
It's difficult to give you much more advice without details from you.
  1 Commento
Molly
Molly il 20 Mag 2013
Thanks! This actually helped a lot. I am new to Matlab and was unaware of not.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Electrical Block Libraries in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by