fix
This commit is contained in:
parent
a3da4f5c76
commit
a3b003c422
5
model.py
5
model.py
@ -21,7 +21,8 @@ preprocessor = ColumnTransformer(
|
|||||||
transformers=[
|
transformers=[
|
||||||
('num', StandardScaler(), ['Age', 'BodyweightKg']),
|
('num', StandardScaler(), ['Age', 'BodyweightKg']),
|
||||||
('cat', OneHotEncoder(), ['Sex'])
|
('cat', OneHotEncoder(), ['Sex'])
|
||||||
]
|
],
|
||||||
|
remainder='passthrough'
|
||||||
)
|
)
|
||||||
|
|
||||||
pipeline = Pipeline(steps=[
|
pipeline = Pipeline(steps=[
|
||||||
@ -38,6 +39,6 @@ pipeline['model'].compile(optimizer='adam', loss='mse', metrics=['mae'])
|
|||||||
X_train_excluded = X_train.iloc[1:]
|
X_train_excluded = X_train.iloc[1:]
|
||||||
y_train_excluded = y_train.iloc[1:]
|
y_train_excluded = y_train.iloc[1:]
|
||||||
|
|
||||||
pipeline.fit(X_train_excluded, y_train_excluded, model__epochs=10, model__validation_split=0.1)
|
pipeline.fit(X_train_excluded, y_train_excluded, model__epochs=int(sys.argv[1]), model__validation_split=0.1)
|
||||||
|
|
||||||
pipeline['model'].save('powerlifting_model.h5')
|
pipeline['model'].save('powerlifting_model.h5')
|
||||||
|
Loading…
Reference in New Issue
Block a user