<jupyter_start><jupyter_text>DecisionTree<jupyter_code>run_model( DecisionTreeRegressor(max_depth=5), cat_feats)<jupyter_output><empty_output><jupyter_text>Random Forest<jupyter_code>model = RandomForestRegressor(max_depth=5, n_estimators=50, random_state=0)
run_model(model, cat_feats)<jupyter_output><empty_output><jupyter_text>XGBoost<jupyter_code>xgb_params = {
    'max_depth':5,
    'n_estimators':50,
    'learning_rate':0.1,
    'seed': 0
}
run_model(xgb.XGBRegressor(**xgb_params), cat_feats)
m = xgb.XGBRegressor(max_depth=5, n_estimators=50, learning_rate=0.1, seed=0)
m.fit(X,y)

imp=PermutationImportance(m, random_state=0).fit(X,y)
eli5.show_weights(imp, feature_names=cat_feats)
	feats= ['param_napęd__cat',
	'param_rok-produkcji',  #usunieto __cat
	'param_stan__cat',
	'param_skrzynia-biegów__cat',
	'param_faktura-vat__cat',
	'param_moc', #usunieto __cat
	'param_marka-pojazdu__cat',
	'feature_kamera-cofania__cat',
	'param_typ__cat',
	'param_pojemność-skokowa', #usunieto __cat
	'seller_name__cat',
	'feature_wspomaganie-kierownicy__cat',
	'param_model-pojazdu__cat',
	'param_wersja__cat',
	'param_kod-silnika__cat',
	'feature_system-start-stop__cat',
	'feature_asystent-pasa-ruchu__cat',
	'feature_czujniki-parkowania-przednie__cat',
	'feature_łopatki-zmiany-biegów__cat',
	'feature_regulowane-zawieszenie__cat']
len(feats)
df['param_rok-produkcji'] = df['param_rok-produkcji'].map(lambda x: -1 if str(x) == 'None' else int(x))  # edytujemy poszczegolne zmienne tak, zeby miały większą wartość objaśniającą (zmienne ciągłe)
df['param_moc'] = df['param_moc'].map(lambda x: -1 if str(x) == 'None' else int(x.split(' ')[0]))
run_model(xgb.XGBRegressor(**xgb_params), feats)
df['param_pojemność-skokowa'].unique()
df['param_pojemność-skokowa'] = df['param_pojemność-skokowa'].map(lambda x: -1 if str(x) == 'None' else int(str(x).split('cm')[0].replace(' ','')))
run_model(xgb.XGBRegressor(**xgb_params), feats)
!git init
!git add .
!git config --global user.email '<EMAIL>'
!git config --global user.name 'KonradWasikiewicz'
!git commit
!git remote add origin https://github.com/KonradWasikiewicz/dw_matrix_car.git
!git push --all origin<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.153987167736022, 'fraction_numerical': 0.010999083409715857, 'mean_word_length': 8.369098712446352, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 1, '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': '508139', 'license': 'MIT', 'n_tokens_mistral': 968, 'n_tokens_neox': 949, 'n_words': 123, 'path': 'day4.ipynb', 'repo_name': 'KonradWasikiewicz/dw_matrix_car', 'size': '2203'}