diff --git a/MANIFEST.in b/MANIFEST.in index 49210f4..cd84699 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ graft clairvoyance include setup.py include LICENSE.txt include README.md +include requirements.txt global-exclude *.py[cod] global-exclude Icon* global-exclude .DS_Store diff --git a/clairvoyance/__init__.py b/clairvoyance/__init__.py index 2b1c88f..316b837 100644 --- a/clairvoyance/__init__.py +++ b/clairvoyance/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2024.7.6" +__version__ = "2024.7.8" from . import utils from . import visuals diff --git "a/clairvoyance/__pycache__/Icon\r" "b/clairvoyance/__pycache__/Icon\r" new file mode 100644 index 0000000..e69de29 diff --git a/clairvoyance/bayesian.py b/clairvoyance/bayesian.py index fa0f29d..5cf37cc 100644 --- a/clairvoyance/bayesian.py +++ b/clairvoyance/bayesian.py @@ -33,6 +33,9 @@ ClairvoyanceRecursiveFeatureElimination, ) +# Memory profiling +from memory_profiler import profile + _bayesianclairvoyancebase_docstring = """ # Modeling parameters: # ==================== @@ -455,7 +458,6 @@ def _feature_selection(self, estimator, X, y, X_testing, y_testing, study_name): # Show the feature weights be scaled? Before or after return (selected_features, model_fs.initial_feature_importances_, model_fs.feature_selected_importances_, model_fs.performance_drifts_, feature_selected_training_cv, feature_selected_testing_score) - def _fit(self, X, y, cv, X_testing=None, y_testing=None, optimize_with_training_and_testing="auto", **study_kws): # How to use the test set here? if self.copy_X: self.X_ = X.copy() @@ -624,6 +626,7 @@ def _get_results(self): df.index.name = "study_name" return df + @profile def fit(self, X, y, cv=3, X_testing=None, y_testing=None, optimize_with_training_and_testing="auto", **study_kws): self._fit( X=X, @@ -637,6 +640,7 @@ def fit(self, X, y, cv=3, X_testing=None, y_testing=None, optimize_with_training self.results_ = self._get_results() return self + @profile def fit_transform(self, X, y, cv=3, X_testing=None, y_testing=None, optimize_with_training_and_testing="auto", **study_kws): self._fit( X=X, diff --git a/requirements.txt b/requirements.txt index eaacff9..27218f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,5 @@ xarray>=0.10.3 seaborn>=0.10.1 optuna>=3.6.1 feature_engine>=1.8.0 +memory-profiler #shap>=0.45.1 diff --git a/setup.py b/setup.py index 9da64f0..3db3527 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ description='Feature selection via recursive feature inclusion', url='https://github.com/jolespin/clairvoyance', author='Josh L. Espinoza', - author_email='jespinoz@jcvi.org', + author_email='jol.espinoz@gmail.com', license='BSD-3', packages=["clairvoyance"], install_requires=requirements[::-1],