From 9d0113448cf7c937249d40a7c10ff76a57ad183c Mon Sep 17 00:00:00 2001 From: Yevhenii Poliakov Date: Sun, 14 May 2023 22:12:28 +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 8821fb2..fc78c5c 100644 --- a/script5_1.py +++ b/script5_1.py @@ -55,7 +55,8 @@ y_train.fillna(y_train.mean(), inplace=True) # Convert the 'y_train' series to a NumPy array 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)]) # Create the neural network model model = Sequential()