Skip to content

Commit 7112a90

Browse files
committed
fix: remove inf numbers
1 parent dae1773 commit 7112a90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

code/pages/1_Learning trajectory.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def app():
4747

4848
def do_pca(df, name):
4949
df = df.dropna(axis=0, how='any')
50+
df = df[~df.isin([np.nan, np.inf, -np.inf]).any(axis=1)]
5051

5152
# Standardize the features
5253
x = StandardScaler().fit_transform(df.drop(columns=['subject_id', 'session']))

0 commit comments

Comments
 (0)