update create train_dev_test

This commit is contained in:
Maciej Czajka 2022-03-21 08:52:14 +01:00
parent d9491fd0e1
commit e0ecd91f6d

View File

@ -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)
# 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)