Created
May 16, 2018 16:07
-
-
Save WillKoehrsen/b4919a2420f3e750a62a5d6da80c735b to your computer and use it in GitHub Desktop.
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
# Function to calculate mean absolute error | |
def mae(y_true, y_pred): | |
return np.mean(abs(y_true - y_pred)) | |
baseline_guess = np.median(y) | |
print('The baseline guess is a score of %0.2f' % baseline_guess) | |
print("Baseline Performance on the test set: MAE = %0.4f" % mae(y_test, baseline_guess)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment