changed script
This commit is contained in:
parent
13369ee6ba
commit
e8c6c3e7c3
5
model.py
5
model.py
@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import pandas as pd
|
||||
from sklearn.model_selection import train_test_split
|
||||
from sklearn.preprocessing import StandardScaler, OneHotEncoder
|
||||
@ -7,7 +8,7 @@ from tensorflow.keras.models import Sequential
|
||||
from tensorflow.keras.layers import Dense
|
||||
import tensorflow as tf
|
||||
|
||||
data = pd.read_csv('openpowerlifting.csv')
|
||||
data = pd.read_csv('./data/train.csv')
|
||||
|
||||
data = data[['Sex', 'Age', 'BodyweightKg', 'TotalKg']].dropna()
|
||||
|
||||
@ -34,6 +35,6 @@ pipeline = Pipeline(steps=[
|
||||
|
||||
pipeline['model'].compile(optimizer='adam', loss='mse', metrics=['mae'])
|
||||
|
||||
pipeline.fit(X_train.iloc[:, 1:], y_train, model__epochs=10, model__validation_split=0.1)
|
||||
pipeline.fit(X_train.iloc[:, 1:], y_train.iloc[:, 1:], model__epochs=int(sys.argv[1]), model__validation_split=0.1)
|
||||
|
||||
pipeline['model'].save('powerlifting_model.h5')
|
||||
|
Loading…
Reference in New Issue
Block a user