From 830d0030ddb3219259fc1c1848dc6cf057051d4f Mon Sep 17 00:00:00 2001 From: Yevhenii Poliakov Date: Sun, 14 May 2023 20:34:27 +0200 Subject: [PATCH] upd 5 --- script5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script5.py b/script5.py index e612896..3885c9a 100644 --- a/script5.py +++ b/script5.py @@ -18,8 +18,8 @@ y = data['Rating'] # Convert the categorical columns into numerical representations mlb = MultiLabelBinarizer() X['Generes'] = mlb.fit_transform(X['Generes']) -X['Plot Kyeword'] = mlb.fit_transform(X['Plot Kyeword']) -X['Top 5 Casts'] = mlb.fit_transform(X['Top 5 Casts']) +X['Plot Keyword'] = mlb.fit_transform(X['Plot Kyeword']) +X['Top 5 Casts'] = mlb.fit_transform(X['Top 5 Casts'].astype(str)) # Split the data into training and testing sets X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)