diff --git a/Zajęcia 2/main.py b/Zajęcia 2/main.py index b004136..23b3cf6 100644 --- a/Zajęcia 2/main.py +++ b/Zajęcia 2/main.py @@ -66,9 +66,11 @@ def create_plot(games): plt.show() # funkcja dokonująca podziału na podzbiory train i test -def create_train_test(games): - games_train, games_test = sklearn.model_selection.train_test_split(games, test_size=5810, random_state=1) - return games_train, games_test +def create_train_dev_test(games): + games_train, games_test = sklearn.model_selection.train_test_split(games, test_size=6972, random_state=1) + games_test, games_dev = sklearn.model_selection.train_test_split(games_test, test_size=3486, random_state=1) + #games_train, games_test = sklearn.model_selection.train_test_split(games, test_size=5810, random_state=1) + return games_train, games_dev, games_test # funkcja pobierająca informacje z danej platformy o ocenach metacritic def get_platform_score_metacritic(games, platform): @@ -167,5 +169,6 @@ dataset_information(games) # wypisanie informacji o danej platformie platform_information(games, " Xbox 360") -# podział na podzbiory train i test -games_train, games_test = create_train_test(games) \ No newline at end of file +# podział na podzbiory train, dev i test (6,2,2) +#games_train, games_test = create_train_test(games) +games_train, games_dev, games_test = create_train_dev_test(games)