Update Dockefile and clean code
This commit is contained in:
parent
b5739c0a43
commit
83d2766149
@ -10,4 +10,9 @@ RUN mkdir -p /.kaggle && chown -R jenkins /.kaggle
|
|||||||
|
|
||||||
USER jenkins
|
USER jenkins
|
||||||
|
|
||||||
|
COPY data_processing.py .
|
||||||
|
COPY create_model.py .
|
||||||
|
COPY helper.py .
|
||||||
|
COPY predict_price.py .
|
||||||
|
|
||||||
WORKDIR .
|
WORKDIR .
|
@ -25,5 +25,3 @@ model.compile(optimizer=adam, loss='mean_squared_error')
|
|||||||
model.fit(X_train, Y_train, epochs=20, batch_size=32, validation_data=(X_dev, Y_dev))
|
model.fit(X_train, Y_train, epochs=20, batch_size=32, validation_data=(X_dev, Y_dev))
|
||||||
|
|
||||||
model.save('hp_model.h5')
|
model.save('hp_model.h5')
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|
||||||
|
|
||||||
def prepare_tensors(df):
|
def prepare_tensors(df):
|
||||||
Y = df["Price"]
|
Y = df["Price"]
|
||||||
X = df.drop("Price", axis=1)
|
X = df.drop("Price", axis=1)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
from keras.models import load_model
|
from keras.models import load_model
|
||||||
|
|
||||||
from helper import prepare_tensors
|
from helper import prepare_tensors
|
||||||
|
|
||||||
hp_test = pd.read_csv('hp_test.csv')
|
hp_test = pd.read_csv('hp_test.csv')
|
||||||
@ -11,5 +10,4 @@ model = load_model('hp_model.h5')
|
|||||||
test_predictions = model.predict(X_test)
|
test_predictions = model.predict(X_test)
|
||||||
|
|
||||||
predictions_df = pd.DataFrame(test_predictions, columns=["Predicted_Price"])
|
predictions_df = pd.DataFrame(test_predictions, columns=["Predicted_Price"])
|
||||||
|
|
||||||
predictions_df.to_csv('hp_test_predictions.csv', index=False)
|
predictions_df.to_csv('hp_test_predictions.csv', index=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user