<jupyter_start><jupyter_text>Compare Models<jupyter_code>best_models = compare_models(fold=5)<jupyter_output><empty_output><jupyter_text>Create Model<jupyter_code>model = create_model('lightgbm', fold=5)<jupyter_output><empty_output><jupyter_text>Tuning Model<jupyter_code>tuned_lgbm = tune_model(model, n_iter=5, search_library='scikit-optimize', fold=5)<jupyter_output>Fitting 5 folds for each of 1 candidates, totalling 5 fits
[Parallel(n_jobs=-1)]: Using backend LokyBackend with 8 concurrent workers.
[LightGBM] [Warning] bagging_fraction is set=0.6460623753119883, subsample=1.0 will be ignored. Current value: bagging_fraction=0.6460623753119883
[LightGBM] [Warning] feature_fraction is set=0.9597207993087004, colsample_bytree=1.0 will be ignored. Current value: feature_fraction=0.9597207993087004
[LightGBM] [Warning] bagging_freq is set=5, subsample_freq=0 will be ignored. Current value: bagging_freq=5
[LightGBM] [Warning] bagging_fraction is set=0.6460623753119883, subsample=1.0 will be ignored. Current value: bagging_fraction=0.6460623753119883
[LightGBM] [Warning] feature_fraction is set=0.9597207993087004, colsample_bytree=1.0 will be ignored. Current value: feature_fraction=0.9597207993087004
[LightGBM] [Warning] bagging_freq is set=5, subsample_freq=0 will be ignored. Current value: bagging_freq=5
[LightGBM] [Warning] bagging_fraction is set=0.[...]<jupyter_text>Metrics<jupyter_code>plot_model(tuned_lgbm, plot='auc')
plot_model(tuned_lgbm, plot='feature')
plot_model(tuned_lgbm, plot='confusion_matrix')
predict_model(tuned_lgbm);<jupyter_output><empty_output><jupyter_text>Finalize Model<jupyter_code>final_model = finalize_model(tuned_lgbm)
predict_model(final_model, data=test)
save_model(final_model, model_name='best_model')<jupyter_output>Transformation Pipeline and Model Succesfully Saved
{'fraction_non_alphanumeric': 0.10246575342465754, 'fraction_numerical': 0.08767123287671233, 'mean_word_length': 11.013157894736842, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '331936', 'license': 'MIT', 'n_tokens_mistral': 760, 'n_tokens_neox': 662, 'n_words': 123, 'path': 'pycaret_data_transform.ipynb', 'repo_name': 'MaksonViini/Project-Credit-Risc', 'size': '1825'}