diff --git a/z434743-create-dataset.py b/z434743-create-dataset.py index 90dcfa9..c177846 100644 --- a/z434743-create-dataset.py +++ b/z434743-create-dataset.py @@ -11,11 +11,13 @@ movies = pandas.read_csv('./ium_z434743/rotten_tomatoes_movies.csv', sep=',') movies = movies.dropna() +movies = movies.drop(movies.columns[[0, 1, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15]], axis=1) movies = movies.sample(CUTOFF) -X, Y = movies, movies +X = movies.copy() +Y = pandas.DataFrame(movies.pop('audienceScore')) X_train, X_temp, Y_train, Y_temp = train_test_split(X, Y, test_size=0.3, random_state=1) @@ -24,3 +26,6 @@ X_dev, X_test, Y_dev, Y_test = train_test_split(X_temp, Y_temp, test_size=0.3, r X_train.to_csv('X_train.csv', index=False) X_dev.to_csv('X_dev.csv', index=False) X_test.to_csv('X_test.csv', index=False) +Y_test.to_csv('Y_test.csv', index=False) +Y_train.to_csv('Y_train.csv', index=False) +Y_dev.to_csv('Y_dev.csv', index=False)