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
| import numpy as np | |
| import pygame | |
| pygame.init() | |
| WIDTH, HEIGHT = 400, 600 | |
| SCREEN = pygame.display.set_mode((WIDTH,HEIGHT)) | |
| GameOn = True | |
| CLOCK = pygame.time.Clock() | |
| FRAMERATE = 60 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| import numpy as np | |
| from sklearn.model_selection import KFold | |
| from sklearn.metrics import mean_squared_error | |
| from sklearn.base import clone | |
| def transformer(y, func=None): | |
| """Transforms target variable and prediction""" | |
| if func is None: | |
| return y | |
| else: |
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
| # Idea borrowed from this script: https://www.kaggle.com/serigne/stacked-regressions-top-4-on-leaderboard | |
| def impute(all_data): | |
| # PoolQC : data description says NA means "No Pool". That make sense, given the huge ratio of missing value (+99%) and majority of houses have no Pool at all in general. | |
| all_data["PoolQC"] = all_data["PoolQC"].fillna("None") | |
| # MiscFeature : data description says NA means "no misc feature" | |
| all_data["MiscFeature"] = all_data["MiscFeature"].fillna("None") |
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
| # restore_packages.R | |
| # | |
| # installs each package from the stored list of packages | |
| # source: http://hlplab.wordpress.com/2012/06/01/transferring-installed-packages-between-different-installations-of-r/ | |
| load("~/installed_packages.rda") | |
| for (count in 1:length(installedpackages)) { | |
| install.packages(installedpackages[count]) | |
| } |