This commit is contained in:
Jakub Zaręba 2023-05-10 15:48:51 +02:00
parent 476b0ad12f
commit 22d024f9c9
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ from sklearn.preprocessing import MinMaxScaler
model = tf.keras.models.load_model('model.h5') model = tf.keras.models.load_model('model.h5')
data = pd.read_csv('Athletes_winter_games.csv', sep=';') data = pd.read_csv('data.csv', sep=';')
data = pd.get_dummies(data, columns=['Sex', 'Medal']) data = pd.get_dummies(data, columns=['Sex', 'Medal'])
data = data.drop(columns=['Name', 'Team', 'NOC', 'Games', 'Year', 'Season', 'City', 'Sport', 'Event']) data = data.drop(columns=['Name', 'Team', 'NOC', 'Games', 'Year', 'Season', 'City', 'Sport', 'Event'])

View File

@ -5,7 +5,7 @@ import tensorflow as tf
from imblearn.over_sampling import SMOTE from imblearn.over_sampling import SMOTE
smote = SMOTE(random_state=42) smote = SMOTE(random_state=42)
data = pd.read_csv('Athletes_winter_games.csv', sep=';') data = pd.read_csv('data.csv', sep=';')
print('Total rows:', len(data)) print('Total rows:', len(data))
print('Rows with medal:', len(data.dropna(subset=['Medal']))) print('Rows with medal:', len(data.dropna(subset=['Medal'])))