Skip to content

Instantly share code, notes, and snippets.

@mustafa-qamaruddin
Created May 4, 2019 17:29
Show Gist options
  • Save mustafa-qamaruddin/348e1986742a72ac3b0f195999c53c29 to your computer and use it in GitHub Desktop.
Save mustafa-qamaruddin/348e1986742a72ac3b0f195999c53c29 to your computer and use it in GitHub Desktop.
# optimal model
model = build_model(_alpha=0.1, _l1_ratio=0.1)
# train model
model.fit(X_train, y_train)
# test score
y_predicted = model.predict(X_test)
score = r2_score(y_test, y_predicted, multioutput='uniform_average')
print("Test Loss: {0:.3f}".format(score))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment