fix
This commit is contained in:
parent
b10d91fa92
commit
f39bf64915
6
model.py
6
model.py
@ -11,7 +11,9 @@ import tensorflow as tf
|
|||||||
data = pd.read_csv('./data/train.csv')
|
data = pd.read_csv('./data/train.csv')
|
||||||
|
|
||||||
data = data[['Sex', 'Age', 'BodyweightKg', 'TotalKg']].dropna()
|
data = data[['Sex', 'Age', 'BodyweightKg', 'TotalKg']].dropna()
|
||||||
|
data['Age'] = pd.to_numeric(data['Age'], errors='coerce')
|
||||||
|
data['BodyweightKg'] = pd.to_numeric(data['BodyweightKg'], errors='coerce')
|
||||||
|
data['TotalKg'] = pd.to_numeric(data['TotalKg'], errors='coerce')
|
||||||
features = data[['Sex', 'Age', 'BodyweightKg']]
|
features = data[['Sex', 'Age', 'BodyweightKg']]
|
||||||
target = data['TotalKg']
|
target = data['TotalKg']
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ preprocessor = ColumnTransformer(
|
|||||||
pipeline = Pipeline(steps=[
|
pipeline = Pipeline(steps=[
|
||||||
('preprocessor', preprocessor),
|
('preprocessor', preprocessor),
|
||||||
('model', Sequential([
|
('model', Sequential([
|
||||||
Dense(64, activation='relu', input_dim=4),
|
Dense(64, activation='relu', input_dim=5),
|
||||||
Dense(64, activation='relu'),
|
Dense(64, activation='relu'),
|
||||||
Dense(1)
|
Dense(1)
|
||||||
]))
|
]))
|
||||||
|
Loading…
Reference in New Issue
Block a user