Created
November 6, 2020 18:17
-
-
Save tiaplagata/0b4d3fec61b963481f4c46c0e3b8357d to your computer and use it in GitHub Desktop.
Transform back to USD and Calculate RMSE
This file contains hidden or 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
| # Transform back to regular $USD price (not log price) | |
| train_mse_non_log = mean_squared_error(10**(inv_normalize_price(y_train)), 10**(inv_normalize_price(y_hat_train))) | |
| test_mse_non_log = mean_squared_error(10**(inv_normalize_price(y_test)), 10**(inv_normalize_price(y_hat_test))) | |
| #Take the square root of mse to find rmse | |
| print('Train rmse non-log:', np.sqrt(train_mse_non_log)) | |
| print('Test rmse non-log:', np.sqrt(test_mse_non_log)) | |
| Train rmse non-log: 130614.39183027687 | |
| Test rmse non-log: 131683.5255367141 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment