<jupyter_start><jupyter_text>Train Data evaluation<jupyter_code>train_fld = train_out_data[train_out_data>0]
pred_trn = predict(output, newdata = as.data.frame(train_in_data), type='response')
pred_trn_capped = replace(pred_trn, pred_trn > 159, 159)
pred_trn_fld = pred_trn_capped[model_data[prt$Resample1, out_col_name]>0]
mean(abs(pred_trn_capped - train_out_data))
mean(abs(train_fld - pred_trn_fld))
max_val = max(max(train_fld), max(pred_trn_fld))
plot(pred_trn_fld, train_fld, asp=1, ylim=c(0,max_val), xlim=c(0,max_val))<jupyter_output><empty_output><jupyter_text>Test data<jupyter_code>test_out_data
test_fld = test_out_data[test_out_data>0]
pred = predict(output, newdata = as.data.frame(test_in_data), type='response')
max(pred)
pred_capped = replace(pred, pred > 159, 159)
pred_fld = pred_capped[model_data[-prt$Resample1, out_col_name]>0]
pred_capped
sort(pred_capped)
mean(abs(pred_capped - test_out_data)^2)
mean(abs(test_fld - pred_fld))
max_val = max(max(test_fld), max(pred_fld))
plot(pred_fld, test_fld, asp=1, ylim=c(0,max_val), xlim=c(0,max_val))
impo = as.data.frame(output$importance)
par(las=2)
data.frame()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1413793103448276, 'fraction_numerical': 0.022413793103448276, 'mean_word_length': 11.221052631578948, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '516917', 'license': 'MIT', 'n_tokens_mistral': 530, 'n_tokens_neox': 514, 'n_words': 64, 'path': 'models/model_flood_counts-rf.ipynb', 'repo_name': 'uva-hydroinformatics-lab/flood_data', 'size': '1160'}