Skip to content

Instantly share code, notes, and snippets.

@yohanesnuwara
Created August 22, 2021 13:26
Show Gist options
  • Save yohanesnuwara/6c2e9c8a64c3fa4dda09dadc8edda9b7 to your computer and use it in GitHub Desktop.
Save yohanesnuwara/6c2e9c8a64c3fa4dda09dadc8edda9b7 to your computer and use it in GitHub Desktop.
Code for optimization 2
def predict(model, Depth, PHIF, VSH, SW, KLOGH, WOB, SURF_RPM):
# Make a test input
X_test = np.array([Depth, WOB, SURF_RPM, PHIF, VSH, SW, KLOGH])
X_test = X_test.reshape(1,-1)
# Predict on a test input
y_pred = model.predict(X_test)
return y_pred[0]
# Predict on new inputs
predict(pipe, 4000, 0.2, 0.5, 1, 500, WOB=5e4, SURF_RPM=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment