A Lightweight Decision Tree Framework supporting regular algorithms: ID3, C4.5, CART, CHAID and Regression Trees; some advanced techniques: Gradient Boosting, Random Forest and Adaboost w/categorical features support for Python
While working with the Chefboost library and with the CHAID model in particular, I noticed that the module_name variable in the Training.py module is not defined with the proper format.
-Instead of:
module_name = "outputs/rules/rules"
module_name should be formatted as:
module_name = "outputs.rules.rules"
The previous configuration was returning the following error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[9], line 1
----> 1 model = cb.fit(df_train, config, target_label=target_var_name)
File ~/.local/lib/python3.11/site-packages/chefboost/Chefboost.py:275, in fit(df, config, target_label, validation_df, silent)
272 json_file = "outputs/rules/rules.json"
273 functions.createFile(json_file, "[\n")
--> 275 trees = Training.buildDecisionTree(
276 df,
277 root=root,
278 file=file,
279 config=config,
280 dataset_features=dataset_features,
281 parent_level=0,
282 leaf_id=0,
283 parents="root",
284 validation_df=validation_df,
285 main_process_id=process_id,
286 )
288 if silent is False:
289 logger.info("-------------------------")
File ~/.local/lib/python3.11/site-packages/chefboost/training/Training.py:720, in buildDecisionTree(df, root, file, config, dataset_features, parent_level, leaf_id, parents, tree_id, validation_df, main_process_id)
714 module_name = "outputs/rules/rules.py"
...
30 print(spec)
File <frozen importlib.util>:94, in find_spec(name, package)
ModuleNotFoundError: No module named 'outputs/rules/rules'
Now everything seems fine for me.
I will appreciate if you can give me some feedback on this matter.
Hello Serengil,
While working with the Chefboost library and with the CHAID model in particular, I noticed that the module_name variable in the Training.py module is not defined with the proper format.
-Instead of:
module_name should be formatted as:
The previous configuration was returning the following error:
Now everything seems fine for me. I will appreciate if you can give me some feedback on this matter.
Thank you in advance.
Kind regards,
Iliyan Tashinov