<jupyter_start><jupyter_text>after adding for-loop to generate new '*_cat' categories above<jupyter_code># feats_cat = [x for x in df.columns if 'cat' in]
feats_cat = [x for x in df.columns if x.endswith('_cat')]
# feats_cat
feats += feats_cat
feats = list(set(feats))
model = RandomForestRegressor(max_depth=5, n_estimators=100, random_state=0)
run_model(feats, model)
X = df[ feats ].values
y = df[ 'prices_amountmin' ].values

m = RandomForestRegressor(max_depth=5, n_estimators=100, random_state=0)
m.fit(X, y)

perm = PermutationImportance(m, random_state=1).fit(X, y);
eli5.show_weights(perm, feature_names=feats)
feats = ['brand_cat', 'feat_brand_cat', 'feat_weight_cat', 'feat_material_cat', 'feat_style_cat', 'feat_gender_cat', 'feat_color_cat', 'feat_fabric content_cat']
model = RandomForestRegressor(max_depth=5, n_estimators=100, random_state=0)
result = run_model(feats, model)
print(result)
X = df[ feats ].values
y = df[ 'prices_amountmin' ].values

m = RandomForestRegressor(max_depth=5, n_estimators=100, random_state=0)
m.fit(X, y)
print(result)
perm = PermutationImportance(m, random_state=1).fit(X, y);
eli5.show_weights(perm, feature_names=feats)
!git add matrix_one/day4.ipynb<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13669650122050447, 'fraction_numerical': 0.02034174125305126, 'mean_word_length': 8.11111111111111, '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': '344781', 'license': 'MIT', 'n_tokens_mistral': 506, 'n_tokens_neox': 488, 'n_words': 99, 'path': 'matrix_one/day5.ipynb', 'repo_name': 'annwit/dw_matrix', 'size': '1229'}