-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add suffixes to models to indicate their task (#588)
### Summary of Changes Add the suffix `Classifier` to all models for classification and `Regressor` to all models for regression. While being longer, this naming has many advantages: * Better **readability**: Several models have variants for classification and regressions. Previously, both had the same name, so to understand which one was used in the code, imports had to be checked. * Better **auto-completion**: Now users can simply write `Classifier` or `Regressor` to get a list of all suitable models. * Better **understandability**: Now it's obvious, that logistic regression is used for classification. --------- Co-authored-by: megalinter-bot <[email protected]>
- Loading branch information
1 parent
ea176fc
commit d490dee
Showing
42 changed files
with
370 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
"""Classes for classification tasks.""" | ||
|
||
from ._ada_boost import AdaBoost | ||
from ._ada_boost import AdaBoostClassifier | ||
from ._classifier import Classifier | ||
from ._decision_tree import DecisionTree | ||
from ._gradient_boosting import GradientBoosting | ||
from ._k_nearest_neighbors import KNearestNeighbors | ||
from ._logistic_regression import LogisticRegression | ||
from ._random_forest import RandomForest | ||
from ._support_vector_machine import SupportVectorMachine | ||
from ._decision_tree import DecisionTreeClassifier | ||
from ._gradient_boosting import GradientBoostingClassifier | ||
from ._k_nearest_neighbors import KNearestNeighborsClassifier | ||
from ._logistic_regression import LogisticRegressionClassifier | ||
from ._random_forest import RandomForestClassifier | ||
from ._support_vector_machine import SupportVectorMachineClassifier | ||
|
||
__all__ = [ | ||
"AdaBoost", | ||
"AdaBoostClassifier", | ||
"Classifier", | ||
"DecisionTree", | ||
"GradientBoosting", | ||
"KNearestNeighbors", | ||
"LogisticRegression", | ||
"RandomForest", | ||
"SupportVectorMachine", | ||
"DecisionTreeClassifier", | ||
"GradientBoostingClassifier", | ||
"KNearestNeighborsClassifier", | ||
"LogisticRegressionClassifier", | ||
"RandomForestClassifier", | ||
"SupportVectorMachineClassifier", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.