Last active
          June 19, 2019 11:38 
        
      - 
      
 - 
        
Save MariaLavrovskaya/d714a90310674cac26ed9914d1fd62d8 to your computer and use it in GitHub Desktop.  
  
    
      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
    
  
  
    
  | #Slope for every predictor | |
| df = pd.DataFrame({'Actual': Y_test.values.flatten(), 'Predicted': y_pred.flatten()}) | |
| df.head(25) | |
| from sklearn.metrics import mean_squared_error, median_squared_error, r2_score | |
| print("Mean squared error: %.2f" | |
| % mean_squared_error(Y_test, y_pred)) | |
| print("Median squared error: %.2f" | |
| % median_squared_error(Y_test, y_pred)) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment