<jupyter_start><jupyter_text>Run all files<jupyter_code>items = sales["item_id"].unique()
filenames = ["expand_df_"+s for s in items]


for idx, item in enumerate(["FOODS_3_278"]):
    
    print(idx+1,"/",len(items),":", item)
    filename = "expand_df_"+item
    df = get_dataframe(filename)
    X = get_features(df)

    X = clean_columns(X)
    X = X.dropna(subset=['sell_price', "pred"])
    Y = X["pred"]
    X = X.drop(["pred"], axis=1)

    X, encoders = categorial_encode(X)

    x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.2)
    
    model, rmse = train(x_train, x_test, y_train, y_test)
    pred = submission(df, model, encoders)
    save_submission("submission/submission_"+item+".csv", pred)
    
print("DONE")
print("DONE")
items = sales["item_id"].unique()
data = []
for idx, item in enumerate(items):
    try:
        d = pd.read_csv("submission/submission_{}.csv".format(item))
    except Exception as e:
        print(e, item)
    data.append(d)
    if idx%100==0:
        print(idx)
        
df = pd.concat(data) 
# df.to_csv("submission/submission.csv")
print("DONE")
sample_submission = pd.read_csv("../data/sample_submission.csv")
# sample_submission[""]
dfeval = sample_submission[sample_submission.id.str.endswith('evaluation')]
df = pd.concat([df, dfeval]) 
len(df), len(sample_submission)
a = (df["id"].values)
b = (sample_submission["id"].values)

set(a)==set(b)
df.to_csv("submission/submission.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17306397306397306, 'fraction_numerical': 0.00808080808080808, 'mean_word_length': 4.326164874551972, 'pattern_counts': {'":': 1, '<': 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': '175297', 'license': 'MIT', 'n_tokens_mistral': 581, 'n_tokens_neox': 570, 'n_words': 98, 'path': 'tk/LBGM.ipynb', 'repo_name': 'chameleonTK/m5-forecasting-accuracy', 'size': '1485'}