Skip to content

Commit

Permalink
trim trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
chanshing committed Sep 25, 2023
1 parent 1890788 commit 202914f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions downstream_task_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,11 @@ def handcraft_features(xyz, sample_rate):
feats["std"] = np.std(m)
feats["range"] = np.ptp(m)
feats["mad"] = stats.median_abs_deviation(m)
feats["kurt"] = stats.kurtosis(m)
feats["skew"] = stats.skew(m)
if feats['std'] > .01:
feats['skew'] = np.nan_to_num(stats.skew(m))
feats['kurt'] = np.nan_to_num(stats.kurtosis(m))
else:
feats['skew'] = feats['kurt'] = 0
feats["enmomean"] = np.mean(np.abs(m - 1))

# Spectrum using Welch's method with 3s segment length
Expand Down

0 comments on commit 202914f

Please sign in to comment.