<jupyter_start><jupyter_text>X,Xt,r,rt=model_selection.train_test_split(X,r,test_size=.2) X.fillna(0, inplace=True)Xt.fillna(0, inplace=True)Xtt.fillna(0, inplace=True) mod = pipeline.make_pipeline(    feature_extraction.DictVectorizer(sparse=False),    preprocessing.StandardScaler(),    linear_model.BayesianRidge(),)mod.fit(X,r)mod.score(Xt,rt) mod = pipeline.make_pipeline(    ensemble.ExtraTreesRegressor(n_estimators=1000),)mod.fit(X,r)mod.score(Xt,rt) mod = pipeline.make_pipeline(    ensemble.RandomForestRegressor(n_estimators=1000),)mod.fit(X,r)mod.score(Xt,rt) mod=xgboost.XGBRegressor(n_estimators=1000, reg_lambda=.1)mod.fit(X,r)mod.score(Xt,rt)<jupyter_code>rscv=model_selection.RandomizedSearchCV(
    xgboost.XGBRegressor(n_estimators=1000, reg_lambda=.1),
    dict(n_estimators=sc.stats.randint(100,1000), reg_lambda=sc.stats.expon(scale=.1)),
    cv=10,n_iter=30,verbose=9999,
)
rscv.fit(X,r)
#print(rscv.score(Xt,rt))
print(rscv.best_params_)<jupyter_output>Fitting 10 folds for each of 30 candidates, totalling 300 fits
[CV] n_estimators=987, reg_lambda=0.277012845523 .....................
[CV]  n_estimators=987, reg_lambda=0.277012845523, score=0.886438, total=   4.2s
[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    4.3s remaining:    0.0s
[CV] n_estimators=987, reg_lambda=0.277012845523 .....................
[CV]  n_estimators=987, reg_lambda=0.277012845523, score=0.858723, total=   3.4s
[Parallel(n_jobs=1)]: Done   2 out of   2 | elapsed:    7.7s remaining:    0.0s
[CV] n_estimators=987, reg_lambda=0.277012845523 .....................
[CV]  n_estimators=987, reg_lambda=0.277012845523, score=0.941071, total=   3.1s
[Parallel(n_jobs=1)]: Done   3 out of   3 | elapsed:   10.8s remaining:    0.0s
[CV] n_estimators=987, reg_lambda=0.277012845523 .....................
[CV]  n_estimators=987, reg_lambda=0.277012845523, score=0.901057, total=   3.2s
[Parallel(n_jobs=1)]: Done   4 out of   4 | elapsed:   14.0s remaining:    0.0s
[CV] n_es[...]<jupyter_text>mod=rscv.best_estimator_mod.fit(pd.concat([X,Xt]), pd.concat([r,rt]))<jupyter_code>mod=rscv
mod.predict(Xtt)<jupyter_output><empty_output><jupyter_text>mod = pipeline.make_pipeline(    feature_extraction.DictVectorizer(sparse=False),    preprocessing.StandardScaler(),    neural_network.MLPRegressor(hidden_layer_sizes=[20,], max_iter=10000, learning_rate_init=.01, activation='logistic'),)mod.fit(X,r)mod.score(Xt,rt) mod = pipeline.make_pipeline(    feature_extraction.DictVectorizer(sparse=False),    preprocessing.StandardScaler(),)xm = mod.fit_transform(X)xtm = mod.transform(Xt)fc = ln.infer_real_valued_columns_from_input(xm)clf = ln.DNNRegressor(    hidden_units=[100,100,100,100],    feature_columns=fc,    model_dir="/tmp/model3",    config=tf.contrib.learn.RunConfig(save_checkpoints_secs=1))valmon = ln.monitors.ValidationMonitor(    xtm,    rt,    every_n_steps=50,    early_stopping_metric="loss",    early_stopping_metric_minimize=True,    early_stopping_rounds=100)clf.fit(xm,r,monitors=[valmon]) u=clf.evaluate(xtm,rt)['loss']v=sum((r-r.mean())**2)(1-u/v) mod = pipeline.make_pipeline(    ensemble.GradientBoostingRegressor(n_estimators=1000),)mod.fit(X,r)mod.score(Xt,rt) mod.predict(Xtt)<jupyter_code>res = pd.DataFrame(columns=['Id','SalePrice'])
res.Id = test.Id
res.SalePrice=mod.predict(Xtt)
#res.SalePrice=clf.predict(mod.transform(Xtt))
res.to_csv('subm.csv', index=None)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17475160724722386, 'fraction_numerical': 0.07977790765634132, 'mean_word_length': 5.943204868154158, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '600524', 'license': 'MIT', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1395, 'n_words': 154, 'path': 'housing.ipynb', 'repo_name': 'IDex/notebooks', 'size': '3422'}