<jupyter_start><jupyter_text>no game<jupyter_code># nogame

model1 = lgb.LGBMRegressor(**params1)
model1.fit(dtr_n1.drop(columns=col_label+col_key).values,dtr_n1['target1'].values,
           eval_set=[(dtt_n1.drop(columns=col_label+col_key).values,dtt_n1['target1'].values)],verbose=500)

model2 = lgb.LGBMRegressor(**params1)
model2.fit(dtr_n2.drop(columns=col_label+col_key).values,dtr_n2['target2'].values,
           eval_set=[(dtt_n2.drop(columns=col_label+col_key).values,dtt_n2['target2'].values)],verbose=500)


model3 = lgb.LGBMRegressor(**params1)
model3.fit(dtr_n3.drop(columns=col_label+col_key).values,dtr_n3['target3'].values,
           eval_set=[(dtt_n3.drop(columns=col_label+col_key).values,dtt_n3['target3'].values)],verbose=500)

model4 = lgb.LGBMRegressor(**params1)
model4.fit(dtr_n4.drop(columns=col_label+col_key).values,dtr_n4['target4'].values,
           eval_set=[(dtt_n4.drop(columns=col_label+col_key).values,dtt_n4['target4'].values)],verbose=500)

if SAVE:
    joblib.dump(model4,DATA_PATH/Path('t4n_'+lag_name+'.pkl'))
    joblib.dump(model3,DATA_PATH/Path('t3n_'+lag_name+'.pkl'))
    joblib.dump(model2,DATA_PATH/Path('t2n_'+lag_name+'.pkl'))
    joblib.dump(model1,DATA_PATH/Path('t1n_'+lag_name+'.pkl'))
pred1 = model1.predict(dtt_n1.drop(columns=col_label+col_key).values)
pred2 = model2.predict(dtt_n2.drop(columns=col_label+col_key).values)
pred3 = model3.predict(dtt_n3.drop(columns=col_label+col_key).values)
pred4 = model4.predict(dtt_n4.drop(columns=col_label+col_key).values)

score_lgb1 = mean_absolute_error(pred1, dtt_n1['target1'].values)
score_lgb2 = mean_absolute_error(pred2, dtt_n2['target2'].values)
score_lgb3 = mean_absolute_error(pred3, dtt_n3['target3'].values)
score_lgb4 = mean_absolute_error(pred4, dtt_n4['target4'].values)
score2 = (score_lgb1+score_lgb2+score_lgb3+score_lgb4)/4
print('mae:', score_lgb1,score_lgb2,score_lgb3,score_lgb4)
print('score2:', score2)
(score1+score2)/2<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1691139240506329, 'fraction_numerical': 0.05012658227848101, 'mean_word_length': 9.185567010309278, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '225685', 'license': 'MIT', 'n_tokens_mistral': 873, 'n_tokens_neox': 851, 'n_words': 52, 'path': 'notebook/trainmlb2021-3.ipynb', 'repo_name': 'yufang67/MLB2021', 'size': '1975'}