You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest changing the attribute feature_name and categorical_feature to feature_names and categorical_features respectively, as they both represent lists, and their current naming is misleading.
However, the use of these attributes is apparent in many additional places.
In addition I would suggest renaming their corresponding setter methods set_feature_name and set_categorical_feature in all the places, e.g.:
jameslamb
changed the title
Renaming feature_name and categorical_feature attributes and setters
[python-package] Renaming feature_name and categorical_feature attributes and setters
Oct 31, 2023
I'm -1 on this suggestion. I agree that set_categorical_features() (plural) and similar would be clearer, but at this point the use of the singular form (categorical_feature, feature_name) is a significant part of the project's public API. I don't support breaking users' code in exchange for the slight improvement in clarity of the names.
I would like to suggest changing the attribute
feature_name
andcategorical_feature
tofeature_names
andcategorical_features
respectively, as they both represent lists, and their current naming is misleading.Example of where to change:
LightGBM/python-package/lightgbm/engine.py
Lines 51 to 52 in fcf76bc
However, the use of these attributes is apparent in many additional places.
In addition I would suggest renaming their corresponding setter methods
set_feature_name
andset_categorical_feature
in all the places, e.g.:LightGBM/python-package/lightgbm/basic.py
Line 2638 in fcf76bc
LightGBM/python-package/lightgbm/basic.py
Line 2543 in fcf76bc
The text was updated successfully, but these errors were encountered: