Scientific name of rolling median applied for times series outliers detection algorithm I am a beginner in Machine Learning. I have a small python module related to times series outliers detection. I found in some posts and blogs an algorithm using thresholds calculated based on the rolling (or moving) median and moving standard deviation like in these posts.
df['median']= df['b'].rolling(window).median()
df['std'] = df['b'].rolling(window).std()
#filter setup
df = df[(df.b <= df['median']+3*df['std']) & (df.b >= df['median']-3*df['std'])]


*

*Question 1 : Is there a scientific name for this algorithm?

*Question 2 : Is there a reference for this algorithm?

Thank you very much in advance for your help :)

It is called Repeated Running Medians, usually you start off with a large window size and at each time decrease it.
The algorithm is credited to Tukey and most references are to his book:  "Exploratory data analysis" Addison-Wesley; 1977.
The application of it to TS to detect outliers is used extensively, see for example the SEE algorithm, which uses RRM with LOWESS in order to smooth and segment movement - SEE.
