Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abnormal data processing #4

Open
Zas169 opened this issue Dec 28, 2023 · 0 comments
Open

Abnormal data processing #4

Zas169 opened this issue Dec 28, 2023 · 0 comments

Comments

@Zas169
Copy link

Zas169 commented Dec 28, 2023

def drop_outlier(array,count,bins):
index = []
range_ = np.arange(1,count,bins)
for i in range_[:-1]:
array_lim = array[i:i+bins]
sigma = np.std(array_lim)
mean = np.mean(array_lim)
th_max,th_min = mean + sigma2, mean - sigma2
idx = np.where((array_lim < th_max) & (array_lim > th_min))
idx = idx[0] + i
index.extend(list(idx))
return np.array(index)。这段代码中为啥range_ = np.arange(1,count,bins)这行代码从1开始,而不是从0开始

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant