classifier-toolkit 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/LICENSE +1 -1
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/PKG-INFO +10 -3
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/README.md +6 -0
- classifier_toolkit-0.2.2/classifier_toolkit/feature_selection/__init__.py +59 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/meta_selector.py +24 -1
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/__init__.py +3 -0
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/hyper_parameter_tuning/__init__.py +0 -0
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/hyper_parameter_tuning/tuner.py +641 -0
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/models/__init__.py +1 -0
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/models/base.py +113 -0
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/models/ensemble_methods.py +211 -0
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/utils/__init__.py +1 -0
- classifier_toolkit-0.2.2/classifier_toolkit/model_training/utils/params.py +151 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/pyproject.toml +7 -2
- classifier_toolkit-0.2.1/classifier_toolkit/feature_selection/__init__.py +0 -47
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/__init__.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/bivariate_analysis.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/eda_toolkit.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/feature_engineering.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/first_glance.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/univariate_analysis.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/visualizations.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/warnings/__init__.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/warnings/automated_warnings.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/eda/warnings/default_warnings.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/base.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/embedded_methods/__init__.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/embedded_methods/elastic_net.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/feature_stability.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/utils/__init__.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/utils/data_handling.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/utils/plottings.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/utils/scoring.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/wrapper_methods/__init__.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/wrapper_methods/bayesian_search.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/wrapper_methods/boruta.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/wrapper_methods/rfe.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/wrapper_methods/rfe_catboost.py +0 -0
- {classifier_toolkit-0.2.1 → classifier_toolkit-0.2.2}/classifier_toolkit/feature_selection/wrapper_methods/sequential_selection.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: classifier-toolkit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary:
|
|
5
|
-
Author:
|
|
6
|
-
Author-email:
|
|
5
|
+
Author: senih.yilmaz
|
|
6
|
+
Author-email: senih.yilmaz@qonto.com
|
|
7
7
|
Requires-Python: >=3.9,<3.13
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -25,9 +25,16 @@ Requires-Dist: scipy (<1.14)
|
|
|
25
25
|
Requires-Dist: shap (>=0.44.1,<0.45.0)
|
|
26
26
|
Requires-Dist: statsmodels (>=0.14.2,<0.15.0)
|
|
27
27
|
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
28
|
+
Requires-Dist: tqdm (>=4.66.0,<5.0.0)
|
|
28
29
|
Requires-Dist: xgboost (>=2.1.1,<3.0.0)
|
|
29
30
|
Description-Content-Type: text/markdown
|
|
30
31
|
|
|
32
|
+
[PyPI: classifier-toolkit](https://pypi.org/project/classifier-toolkit/)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install classifier-toolkit
|
|
36
|
+
```
|
|
37
|
+
|
|
31
38
|
# Classifier Toolkit
|
|
32
39
|
|
|
33
40
|
[](https://python-poetry.org/)
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
[PyPI: classifier-toolkit](https://pypi.org/project/classifier-toolkit/)
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
pip install classifier-toolkit
|
|
5
|
+
```
|
|
6
|
+
|
|
1
7
|
# Classifier Toolkit
|
|
2
8
|
|
|
3
9
|
[](https://python-poetry.org/)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Feature selection public API with lazy imports to avoid heavy dependencies at import time.
|
|
2
|
+
|
|
3
|
+
This module exposes a stable public API while delaying imports of optional heavy
|
|
4
|
+
backends (e.g., LightGBM, XGBoost, CatBoost, Matplotlib) until the corresponding
|
|
5
|
+
symbols are actually accessed. This prevents import-time failures in
|
|
6
|
+
environments where optional system libraries are not present and speeds up
|
|
7
|
+
package import for utilities.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from importlib import import_module
|
|
11
|
+
from typing import Any, Dict
|
|
12
|
+
|
|
13
|
+
_EXPORTS: Dict[str, str] = {
|
|
14
|
+
# Core/base and meta
|
|
15
|
+
"BaseFeatureSelector": "classifier_toolkit.feature_selection.base",
|
|
16
|
+
"MetaSelector": "classifier_toolkit.feature_selection.meta_selector",
|
|
17
|
+
"FeatureStability": "classifier_toolkit.feature_selection.feature_stability",
|
|
18
|
+
# Embedded methods
|
|
19
|
+
"ElasticNetLogisticSelector": "classifier_toolkit.feature_selection.embedded_methods.elastic_net",
|
|
20
|
+
# Utils
|
|
21
|
+
"plot_feature_importances": "classifier_toolkit.feature_selection.utils.plottings",
|
|
22
|
+
"plot_rfecv_results": "classifier_toolkit.feature_selection.utils.plottings",
|
|
23
|
+
"get_scorer": "classifier_toolkit.feature_selection.utils.scoring",
|
|
24
|
+
"false_positive_rate": "classifier_toolkit.feature_selection.utils.scoring",
|
|
25
|
+
"true_positive_rate": "classifier_toolkit.feature_selection.utils.scoring",
|
|
26
|
+
# Wrapper methods
|
|
27
|
+
"BayesianFeatureSelector": "classifier_toolkit.feature_selection.wrapper_methods.bayesian_search",
|
|
28
|
+
"BorutaSelector": "classifier_toolkit.feature_selection.wrapper_methods.boruta",
|
|
29
|
+
"RFESelector": "classifier_toolkit.feature_selection.wrapper_methods.rfe",
|
|
30
|
+
"RFECatBoostSelector": "classifier_toolkit.feature_selection.wrapper_methods.rfe_catboost",
|
|
31
|
+
"SequentialSelector": "classifier_toolkit.feature_selection.wrapper_methods.sequential_selection",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
__all__ = list(_EXPORTS.keys())
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def __getattr__(name: str) -> Any: # pragma: no cover - simple lazy loader
|
|
38
|
+
"""Dynamically import and return the requested symbol on first access.
|
|
39
|
+
|
|
40
|
+
This keeps the package import light and avoids importing optional
|
|
41
|
+
dependencies unless they are actually needed by the user.
|
|
42
|
+
"""
|
|
43
|
+
module_path = _EXPORTS.get(name)
|
|
44
|
+
if module_path is None:
|
|
45
|
+
raise AttributeError(
|
|
46
|
+
f"module 'classifier_toolkit.feature_selection' has no attribute '{name}'"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
module = import_module(module_path)
|
|
50
|
+
try:
|
|
51
|
+
return getattr(module, name)
|
|
52
|
+
except AttributeError as exc: # Provide a clearer error if symbol moved/renamed
|
|
53
|
+
raise AttributeError(
|
|
54
|
+
f"'{name}' not found in '{module_path}'. The public API mapping may be outdated."
|
|
55
|
+
) from exc
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def __dir__(): # pragma: no cover - trivial
|
|
59
|
+
return sorted(list(globals().keys()) + __all__)
|
|
@@ -2,7 +2,30 @@ from typing import Dict, List, Literal, Optional, Tuple
|
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
import pandas as pd
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
# Optional progress bar dependency. Fall back to a no-op if tqdm is unavailable.
|
|
7
|
+
try:
|
|
8
|
+
from tqdm import tqdm # type: ignore
|
|
9
|
+
except Exception: # pragma: no cover - fallback only used in limited envs
|
|
10
|
+
|
|
11
|
+
class tqdm: # type: ignore
|
|
12
|
+
def __init__(self, total=None, desc=None):
|
|
13
|
+
"""No-op progress bar placeholder."""
|
|
14
|
+
self.total = total
|
|
15
|
+
self.desc = desc
|
|
16
|
+
|
|
17
|
+
def update(self, _):
|
|
18
|
+
"""No-op update."""
|
|
19
|
+
return None
|
|
20
|
+
|
|
21
|
+
def set_description(self, *_args, **_kwargs) -> None:
|
|
22
|
+
"""No-op description setter."""
|
|
23
|
+
return None
|
|
24
|
+
|
|
25
|
+
def close(self):
|
|
26
|
+
"""No-op close."""
|
|
27
|
+
return None
|
|
28
|
+
|
|
6
29
|
|
|
7
30
|
from classifier_toolkit.feature_selection.base import (
|
|
8
31
|
BaseFeatureSelector,
|
|
File without changes
|