From c3b7f91d57a46c49f4c1980e6b347b634ed84489 Mon Sep 17 00:00:00 2001 From: Yevhenii Poliakov Date: Sun, 14 May 2023 22:14:39 +0200 Subject: [PATCH] upd51 --- script5_1.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script5_1.py b/script5_1.py index fc78c5c..a8630d8 100644 --- a/script5_1.py +++ b/script5_1.py @@ -56,7 +56,8 @@ y_train.fillna(y_train.mean(), inplace=True) y_train = y_train.values # Filter out non-numeric and NaN values from y_train -y_train = np.array([x for x in y_train if np.isfinite(x)]) +y_train = y_train.astype(float) +y_train = y_train[np.isfinite(y_train)] # Create the neural network model model = Sequential()