Skip to content

Instantly share code, notes, and snippets.

View PeiLi-Sandman's full-sized avatar
🎮
Gaming

Pei Li PeiLi-Sandman

🎮
Gaming
View GitHub Profile
@PeiLi-Sandman
PeiLi-Sandman / ThresholdingAlgo.py
Last active May 17, 2022 15:53 — forked from ximeg/ ThresholdingAlgo.py
Python implementation of smoothed z-score algorithm from http://stackoverflow.com/a/22640362/6029703
# The original version is here: https://gist.github.com/ximeg/587011a65d05f067a29ce9c22894d1d2
# I made several modifications
# Line 14, change to range(lag, len(y))
# Add "addof = 1" for np.std
# For avgFilter and stdFilter, change "filteredY[(i-lag):i]" to "filteredY[(i+1-lag):(i+1)]"
import numpy as np
import pylab