Created
August 22, 2021 13:26
-
-
Save yohanesnuwara/6c2e9c8a64c3fa4dda09dadc8edda9b7 to your computer and use it in GitHub Desktop.
Code for optimization 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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