Numpy outlier removal

Joseph L. Casale jcasale at activenetwerx.com
Sun Jan 6 17:50:07 EST 2013


>Assuming your data and the dictionary are keyed by a common set of keys: 

>
>for key in descriptions:
>    if abs(data[key] - mean(data)) >= m * std(data):
>        del data[key]
>        del descriptions[key]


Heh, yeah sometimes the obvious is too simple to see. I used a dict comp to rebuild
the results with the comparison.


Thanks!
jlc


More information about the Python-list mailing list