Skip to content

Instantly share code, notes, and snippets.

@mustafa-qamaruddin
Created May 4, 2019 17:26
Show Gist options
  • Save mustafa-qamaruddin/a690543b1a2558e721ac432a0a04b44f to your computer and use it in GitHub Desktop.
Save mustafa-qamaruddin/a690543b1a2558e721ac432a0a04b44f to your computer and use it in GitHub Desktop.
model = build_model(_alpha=1.0, _l1_ratio=0.3)
kfcv = KFold(n_splits=5)
scores = cross_val_score(model, X_train, y_train, cv=kfcv, scoring=r2)
print("Loss: {0:.3f} (+/- {1:.3f})".format(scores.mean(), scores.std()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment