From d89ed45157d8c500b00e96829776e2e9539f2594 Mon Sep 17 00:00:00 2001 From: Diptesh Date: Sat, 15 Jan 2022 22:56:34 +0530 Subject: [PATCH 1/4] v0.4.1 changelog: - updated numpy version to 1.21 to mitigate CVE-2021-33430 --- logs/cov.out | 6 ++---- logs/pylint/lib-__init__-py.out | 4 ---- logs/pylint/lib-knn-py.out | 10 +++++----- logs/pylint/lib-model-py.out | 10 +++++----- logs/pylint/lib-timeseries-py.out | 10 +++++----- logs/pylint/lib-tree-py.out | 10 +++++----- logs/pylint/mllib-__init__-py.out | 4 ---- logs/pylint/tests-test_metrics-py.out | 7 ------- mllib/__init__.py | 27 --------------------------- mllib/lib/__init__.py | 27 --------------------------- mllib/lib/model.py | 16 +++++++++++++++- requirements.txt | 14 +++++++------- tests/test_model.py | 19 ++++++++----------- 13 files changed, 52 insertions(+), 112 deletions(-) delete mode 100644 logs/pylint/lib-__init__-py.out delete mode 100644 logs/pylint/mllib-__init__-py.out delete mode 100644 mllib/__init__.py delete mode 100644 mllib/lib/__init__.py diff --git a/logs/cov.out b/logs/cov.out index a011f83..176addb 100644 --- a/logs/cov.out +++ b/logs/cov.out @@ -1,12 +1,10 @@ Name Stmts Miss Cover Missing --------------------------------------------------------------------------------------------- -/media/ph33r/Data/Project/CodeLib/Git/mllib/__init__.py 7 0 100% -/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/__init__.py 7 0 100% /media/ph33r/Data/Project/CodeLib/Git/mllib/lib/cluster.py 103 0 100% /media/ph33r/Data/Project/CodeLib/Git/mllib/lib/knn.py 70 0 100% -/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/model.py 44 0 100% +/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/model.py 52 0 100% /media/ph33r/Data/Project/CodeLib/Git/mllib/lib/opt.py 157 0 100% /media/ph33r/Data/Project/CodeLib/Git/mllib/lib/timeseries.py 60 0 100% /media/ph33r/Data/Project/CodeLib/Git/mllib/lib/tree.py 158 0 100% --------------------------------------------------------------------------------------------- -TOTAL 606 0 100% +TOTAL 600 0 100% diff --git a/logs/pylint/lib-__init__-py.out b/logs/pylint/lib-__init__-py.out deleted file mode 100644 index d7495ee..0000000 --- a/logs/pylint/lib-__init__-py.out +++ /dev/null @@ -1,4 +0,0 @@ - --------------------------------------------------------------------- -Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) - diff --git a/logs/pylint/lib-knn-py.out b/logs/pylint/lib-knn-py.out index ccf9413..aa65186 100644 --- a/logs/pylint/lib-knn-py.out +++ b/logs/pylint/lib-knn-py.out @@ -1,8 +1,8 @@ -************* Module mllib.lib.knn -knn.py:176:45: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -knn.py:177:45: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -knn.py:178:46: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -knn.py:179:46: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +************* Module knn +knn.py:176:45: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +knn.py:177:45: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +knn.py:178:46: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +knn.py:179:46: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) diff --git a/logs/pylint/lib-model-py.out b/logs/pylint/lib-model-py.out index acd91c5..b949fd7 100644 --- a/logs/pylint/lib-model-py.out +++ b/logs/pylint/lib-model-py.out @@ -1,8 +1,8 @@ -************* Module mllib.lib.model -model.py:166:41: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -model.py:167:41: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -model.py:168:42: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -model.py:169:42: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +************* Module model +model.py:180:41: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +model.py:181:41: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +model.py:182:42: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +model.py:183:42: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) diff --git a/logs/pylint/lib-timeseries-py.out b/logs/pylint/lib-timeseries-py.out index 21b6189..b9912f8 100644 --- a/logs/pylint/lib-timeseries-py.out +++ b/logs/pylint/lib-timeseries-py.out @@ -1,8 +1,8 @@ -************* Module mllib.lib.timeseries -timeseries.py:201:41: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -timeseries.py:202:41: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -timeseries.py:203:42: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -timeseries.py:204:42: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +************* Module timeseries +timeseries.py:201:41: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +timeseries.py:202:41: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +timeseries.py:203:42: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +timeseries.py:204:42: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) diff --git a/logs/pylint/lib-tree-py.out b/logs/pylint/lib-tree-py.out index 874b694..4545969 100644 --- a/logs/pylint/lib-tree-py.out +++ b/logs/pylint/lib-tree-py.out @@ -1,8 +1,8 @@ -************* Module mllib.lib.tree -tree.py:96:45: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -tree.py:97:45: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -tree.py:98:46: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -tree.py:99:46: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +************* Module tree +tree.py:96:45: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +tree.py:97:45: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +tree.py:98:46: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +tree.py:99:46: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) diff --git a/logs/pylint/mllib-__init__-py.out b/logs/pylint/mllib-__init__-py.out deleted file mode 100644 index d7495ee..0000000 --- a/logs/pylint/mllib-__init__-py.out +++ /dev/null @@ -1,4 +0,0 @@ - --------------------------------------------------------------------- -Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) - diff --git a/logs/pylint/tests-test_metrics-py.out b/logs/pylint/tests-test_metrics-py.out index 10dc202..d7495ee 100644 --- a/logs/pylint/tests-test_metrics-py.out +++ b/logs/pylint/tests-test_metrics-py.out @@ -1,10 +1,3 @@ -************* Module tests.test_metrics -test_metrics.py:61:22: I1101: Module 'mllib.lib.metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -test_metrics.py:69:22: I1101: Module 'mllib.lib.metrics' has no 'mse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -test_metrics.py:77:22: I1101: Module 'mllib.lib.metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -test_metrics.py:85:22: I1101: Module 'mllib.lib.metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -test_metrics.py:93:22: I1101: Module 'mllib.lib.metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -test_metrics.py:101:22: I1101: Module 'mllib.lib.metrics' has no 'aic' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) diff --git a/mllib/__init__.py b/mllib/__init__.py deleted file mode 100644 index ba47ad4..0000000 --- a/mllib/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Initialization file for mllib. - -Credits -------- -:: - - Authors: - - Diptesh - - Date: Sep 01, 2021 -""" - -# pylint: disable=invalid-name -# pylint: disable=wrong-import-position - -import re -import sys - -from inspect import getsourcefile -from os.path import abspath - -# Set base path -path = abspath(getsourcefile(lambda: 0)) -path = re.sub(r"(.+)(\/mllib.*)", "\\1", path) - -sys.path.insert(0, path) diff --git a/mllib/lib/__init__.py b/mllib/lib/__init__.py deleted file mode 100644 index cdb5f64..0000000 --- a/mllib/lib/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Initialization file for mllib/lib. - -Credits -------- -:: - - Authors: - - Diptesh - - Date: Sep 01, 2021 -""" - -# pylint: disable=invalid-name -# pylint: disable=wrong-import-position - -import re -import sys - -from inspect import getsourcefile -from os.path import abspath - -# Set base path -path = abspath(getsourcefile(lambda: 0)) -path = re.sub(r"(.+)(\/mllib.*)", "\\1", path) - -sys.path.insert(0, path) diff --git a/mllib/lib/model.py b/mllib/lib/model.py index efa6afc..2c82e84 100644 --- a/mllib/lib/model.py +++ b/mllib/lib/model.py @@ -16,10 +16,11 @@ """ # pylint: disable=invalid-name -# pylint: disable=R0902,R0903,R0913,C0413 +# pylint: disable=R0902,R0903,R0913,C0413,W0511 from typing import List, Dict +import warnings import re import sys from inspect import getsourcefile @@ -42,6 +43,17 @@ # ============================================================================= +def ignore_warnings(test_func): + """Suppress warnings.""" + + def do_test(self, *args, **kwargs): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + test_func(self, *args, **kwargs) + + return do_test + + class GLMNet(): """GLMNet module. @@ -133,6 +145,8 @@ def __init__(self, self._fit() self._compute_metrics() + # TODO: Remove this once GLMNet is updated + @ignore_warnings def _fit(self) -> None: """Fit the best GLMNet model.""" train_x, test_x,\ diff --git a/requirements.txt b/requirements.txt index 4cac1b2..2ca5a5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ +pandas==1.3.5 pmdarima==1.8.0 -xgboost==1.5.0 -scipy==1.4.1 -xlrd==1.2.0 PuLP==1.6.8 -numpy==1.18.1 -pandas==1.0.1 -Cython==0.29.15 -statsmodels==0.11.0 +xgboost==1.5.0 +statsmodels==0.13.0 +Cython==0.29.25 +xlrd==2.0.1 +numpy==1.21.2 +scipy==1.7.3 scikit_learn==1.0.2 diff --git a/tests/test_model.py b/tests/test_model.py index e0c4cd7..7d74a59 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -51,6 +51,7 @@ def do_test(self, *args, **kwargs): with warnings.catch_warnings(): warnings.simplefilter("ignore") test_func(self, *args, **kwargs) + return do_test @@ -63,21 +64,17 @@ def setUp(self): def test_known_equation(self): """GLMNet: Test a known equation""" df_ip = pd.read_csv(path + "test_glmnet.csv") - mod = GLMNet(df=df_ip, - y_var="y", - x_var=["x1", "x2", "x3"]) + mod = GLMNet(df=df_ip, y_var="y", x_var=["x1", "x2", "x3"]) op = mod.opt - self.assertEqual(np.round(op.get('intercept'), 0), 100.0) - self.assertEqual(np.round(op.get('coef')[0], 0), 2.0) - self.assertEqual(np.round(op.get('coef')[1], 0), 3.0) - self.assertEqual(np.round(op.get('coef')[2], 0), 0.0) + self.assertEqual(np.round(op.get("intercept"), 0), 100.0) + self.assertEqual(np.round(op.get("coef")[0], 0), 2.0) + self.assertEqual(np.round(op.get("coef")[1], 0), 3.0) + self.assertEqual(np.round(op.get("coef")[2], 0), 0.0) def test_predict_target_variable(self): """GLMNet: Test to predict a target variable""" df_ip = pd.read_csv(path + "test_glmnet.csv") - mod = GLMNet(df=df_ip, - y_var="y", - x_var=["x1", "x2", "x3"]) + mod = GLMNet(df=df_ip, y_var="y", x_var=["x1", "x2", "x3"]) df_predict = pd.DataFrame({"x1": [10, 20], "x2": [5, 10], "x3": [100, 0]}) @@ -91,5 +88,5 @@ def test_predict_target_variable(self): # --- Main # ============================================================================= -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() From 6e07e2ff5efda49c1ba9141a48b28c338d66b50b Mon Sep 17 00:00:00 2001 From: Diptesh Date: Sat, 15 Jan 2022 23:30:34 +0530 Subject: [PATCH 2/4] v0.4.1 --- README.md | 9 +++++++++ logs/pylint/lib-knn-py.out | 8 ++++---- mllib/lib/knn.py | 7 +++---- mllib/lib/opt.py | 4 ++-- requirements.txt | 14 +++++++------- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a5495db..2ec71aa 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,15 @@ 1. [Contribution guidelines](./.github/CONTRIBUTING.md) 1. [Project documents](./docs) 1. [Approach](./docs/Approach.pdf) +1. [Available modules](./mllib/lib) + 1. [Clustering](./mllib/lib/cluster.py) - determines optimal _k_ + 1. [GLMNet](./mllib/lib/model.py) - classification/regression + 1. [k-nearest neighbours](./mllib/lib/knn.py) - classification/regression + 1. [Random forest](./mllib/lib/tree.py) - classification/timeseries/regression + 1. [XGBoost](./mllib/lib/tree.py) - classification/timeseries/regression + 1. [Traveling salesman problem](./mllib/lib/opt.py) - integer programming/heuristic + 1. [Transportation problem](./mllib/lib/opt.py) - integer programming + 1. [Time series](./mllib/lib/timeseries.py) 1. [Pull request guidelines](./.github/PULL_REQUEST_TEMPLATE.md) 1. [Initial setup](./README.md#initial-setup) 1. [Unit tests](./README.md#run-unit-tests-and-pylint-ratings) diff --git a/logs/pylint/lib-knn-py.out b/logs/pylint/lib-knn-py.out index aa65186..c77bfb1 100644 --- a/logs/pylint/lib-knn-py.out +++ b/logs/pylint/lib-knn-py.out @@ -1,8 +1,8 @@ ************* Module knn -knn.py:176:45: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -knn.py:177:45: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -knn.py:178:46: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -knn.py:179:46: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +knn.py:175:45: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +knn.py:176:45: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +knn.py:177:46: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +knn.py:178:46: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) diff --git a/mllib/lib/knn.py b/mllib/lib/knn.py index 7483e22..320c1e9 100644 --- a/mllib/lib/knn.py +++ b/mllib/lib/knn.py @@ -3,7 +3,7 @@ **Available routines:** -- class ``KNN``: Builds K-Nearest Neighnour model using cross validation. +- class ``KNN``: Builds K-Nearest Neighbours model using cross validation. Credits ------- @@ -123,7 +123,7 @@ def __init__(self, self.model = None self.k_fold = k_fold if param is None: - max_k = max(int(len(self.df)/(self.k_fold * 2)), 1) + max_k = max(int(len(self.df) / (self.k_fold * 2)), 1) param = {"n_neighbors": list(range(1, max_k, 2)), "weights": ["uniform", "distance"], "metric": ["euclidean", "manhattan"]} @@ -163,8 +163,7 @@ def _fit(self) -> Dict[str, Any]: return_train_score=True, cv=self.k_fold, n_jobs=-1) - gs_op = gs.fit(self.df[self.x_var], - self.df[self.y_var]) + gs_op = gs.fit(self.df[self.x_var], self.df[self.y_var]) self.model = gs_op return gs_op.best_params_ diff --git a/mllib/lib/opt.py b/mllib/lib/opt.py index fe529bd..6db5756 100644 --- a/mllib/lib/opt.py +++ b/mllib/lib/opt.py @@ -46,9 +46,9 @@ class TSP: """ - Travelling salesman problem. + Traveling salesman problem. - Module for `Travelling salesman problem + Module for `Traveling salesman problem `_ using integer programming or nearest neighbour algorithm. diff --git a/requirements.txt b/requirements.txt index 2ca5a5c..c0b40be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ -pandas==1.3.5 -pmdarima==1.8.0 -PuLP==1.6.8 -xgboost==1.5.0 -statsmodels==0.13.0 Cython==0.29.25 -xlrd==2.0.1 -numpy==1.21.2 scipy==1.7.3 +xgboost==1.5.0 +numpy==1.21.2 +pmdarima==1.8.0 +xlrd==2.0.1 +pandas==1.3.5 +statsmodels==0.13.0 +PuLP==1.6.8 scikit_learn==1.0.2 From 9259f400a85e1d14521b7e233e82dca3640f1507 Mon Sep 17 00:00:00 2001 From: Diptesh Date: Sat, 15 Jan 2022 23:48:22 +0530 Subject: [PATCH 3/4] v0.4.1 changelog: - updated pmdarima to 1.8.1 --- requirements.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index c0b40be..11e9c38 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ Cython==0.29.25 -scipy==1.7.3 -xgboost==1.5.0 -numpy==1.21.2 -pmdarima==1.8.0 -xlrd==2.0.1 +PuLP==1.6.8 pandas==1.3.5 statsmodels==0.13.0 -PuLP==1.6.8 +xlrd==2.0.1 +xgboost==1.5.0 +pmdarima==1.8.1 +scipy==1.7.3 +numpy==1.21.2 scikit_learn==1.0.2 From 66c9e51f2316c9b56142e37cc564e343c2134b55 Mon Sep 17 00:00:00 2001 From: Diptesh Date: Sun, 16 Jan 2022 00:02:29 +0530 Subject: [PATCH 4/4] v0.4.1 changelog: - added openpyxl engine --- requirements.txt | 11 ++++++----- tests/test_timeseries.py | 3 ++- tests/test_tree.py | 4 ++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 11e9c38..ee3b7f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,11 @@ -Cython==0.29.25 PuLP==1.6.8 -pandas==1.3.5 -statsmodels==0.13.0 -xlrd==2.0.1 xgboost==1.5.0 +statsmodels==0.13.0 +openpyxl==3.0.9 +pandas==1.3.5 +numpy==1.21.2 +Cython==0.29.25 pmdarima==1.8.1 +xlrd==2.0.1 scipy==1.7.3 -numpy==1.21.2 scikit_learn==1.0.2 diff --git a/tests/test_timeseries.py b/tests/test_timeseries.py index c8f2c0b..886d973 100644 --- a/tests/test_timeseries.py +++ b/tests/test_timeseries.py @@ -25,6 +25,7 @@ import pandas as pd import xlrd +import openpyxl # Set base path path = abspath(getsourcefile(lambda: 0)) @@ -34,7 +35,7 @@ from mllib.lib.timeseries import AutoArima # noqa: F841 -__all__ = ["xlrd", ] +__all__ = ["xlrd", "openpyxl", ] # ============================================================================= # --- DO NOT CHANGE ANYTHING FROM HERE diff --git a/tests/test_tree.py b/tests/test_tree.py index d049730..7a80cd7 100644 --- a/tests/test_tree.py +++ b/tests/test_tree.py @@ -24,6 +24,8 @@ from os.path import abspath import pandas as pd +import xlrd +import openpyxl from sklearn.model_selection import train_test_split as split from sklearn import metrics as sk_metrics @@ -37,6 +39,8 @@ from mllib.lib.tree import RandomForest # noqa: F841 from mllib.lib.tree import XGBoost # noqa: F841 +__all__ = ["xlrd", "openpyxl", ] + # ============================================================================= # --- DO NOT CHANGE ANYTHING FROM HERE # =============================================================================