Skip to content

Instantly share code, notes, and snippets.

@burakekincioglu
Created December 10, 2018 14:47
Show Gist options
  • Save burakekincioglu/8b63dae370fc363965fe36c715bb2971 to your computer and use it in GitHub Desktop.
Save burakekincioglu/8b63dae370fc363965fe36c715bb2971 to your computer and use it in GitHub Desktop.
deneme
import pandas as pd
from keras.models import load_model
model = load_model('trained_model.h5')
X = pd.read_csv("proposed_new_product.csv").values
prediction = model.predict(X)
# Grab just the first element of the first prediction (since we only have one)
prediction = prediction[0][0]
# Re-scale the data from the 0-to-1 range back to dollars
# These constants are from when the data was originally scaled down to the 0-to-1 range
prediction = prediction + 0.1159
prediction = prediction / 0.0000036968
print("Earnings Prediction for Proposed Product - ${}".format(prediction))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment