%load_ext autoreload %autoreload 2 %matplotlib inline from fastai.imports import * from fastai.torch_imports import * from fastai.dataset import * from fastai.learner import * from fastai.structured import * from fastai.column_data import * dep = 'SalePrice' PATH = "data/bulldozers/" df_raw = pd.read_feather('tmp/bulldozers-raw') keep_cols = list(np.load('tmp/keep_cols.npy')) df_raw.loc[df_raw.YearMade<1950, 'YearMade'] = 1950 df_raw['age'] = df_raw.saleYear-df_raw.YearMade df_raw = df_raw[keep_cols+['age', dep]].copy() df_indep = df_raw.drop(dep,axis=1) n_valid = 12000 n_trn = len(df_raw)-n_valid cat_flds = [n for n in df_indep.columns if df_raw[n].nunique()