Reduce outliers in motion data to ensure consistent scaling (#10452)

This commit is contained in:
Nicolas Mowen 2024-03-14 08:31:33 -06:00 committed by GitHub
parent 39a29d148e
commit 45a318dfed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -407,6 +407,8 @@ def motion_activity():
mean = df["motion"].mean()
std = df["motion"].std()
df["motion"] = (df["motion"] - mean) / std
outliers = df.quantile(0.999)["motion"]
df[df > outliers] = outliers
df["motion"] = (
(df["motion"] - df["motion"].min())
/ (df["motion"].max() - df["motion"].min())