fix predict.py
This commit is contained in:
parent
2bbee09bd5
commit
4b3fdb7c23
@ -4,7 +4,7 @@ from tensorflow.keras import Sequential
|
|||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
from sklearn.preprocessing import MinMaxScaler
|
from sklearn.preprocessing import MinMaxScaler
|
||||||
|
|
||||||
test_data = pd.read_csv('./data/car_prices_test.csv')
|
test_data = pd.read_csv('./car_prices_test.csv')
|
||||||
test_data.dropna(inplace=True)
|
test_data.dropna(inplace=True)
|
||||||
|
|
||||||
y_test = test_data['sellingprice'].astype(np.float32)
|
y_test = test_data['sellingprice'].astype(np.float32)
|
||||||
@ -17,7 +17,7 @@ scaler_X = MinMaxScaler()
|
|||||||
X_test['condition'] = scaler_X.fit_transform(X_test[['condition']])
|
X_test['condition'] = scaler_X.fit_transform(X_test[['condition']])
|
||||||
X_test = pd.get_dummies(X_test, columns=['transmission'])
|
X_test = pd.get_dummies(X_test, columns=['transmission'])
|
||||||
|
|
||||||
model = tf.keras.models.load_model('car_prices_predict_model.h5')
|
model = tf.keras.models.load_model('./car_prices_predict_model.h5')
|
||||||
|
|
||||||
y_pred_scaled = model.predict(X_test)
|
y_pred_scaled = model.predict(X_test)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user