Answer the question
In order to leave comments, you need to log in
How to use the Titien-Moore criterion?
There are a number of digital values of length n. There may be several anomalous values in this series (according to the maximum value). Tell me how to use the Titien-Moore test to determine these anomalous values. You can use the Smirnov-Grubbs criterion, it is very simple:
import math
def rem_anomalies(l):
alpha = 2.447
avg = sum(l) / len(l)
sig = 0
for i in l:
sig += (i - avg) * (i - avg)
sig = math.sqrt(sig/len(l))
l2 = []
for i in l:
if alpha > (i - avg)/sig:
l2.append(i)
return l2
l = [1, 22, 123, 121, 11, 23, 1223, 11,43 ,12, 123, 142, 11, 2333, 121, 123]
print(l)
print(rem_anomalies(l))
Answer the question
In order to leave comments, you need to log in
The description of the algorithm and the logarithm critical value function was taken from here
JS example: https://jsfiddle.net/cs0m7r5h/11/
There is a median filter to get rid of outliers.
More precisely, anomalies are not removed from the series, but are replaced by average values.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question