Skip to content

Commit bb499e9

Browse files
committed
v0.4.1
1 parent 371f4b7 commit bb499e9

5 files changed

Lines changed: 16 additions & 24 deletions

File tree

bin/run_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ printf "=%.0s" {1..70}
3131
# Run unit tests
3232
if [[ $module == "-a" || $module == "-u" ]]
3333
then
34-
printf "\nRunning unit & integration tests...\n\n"
34+
printf "\nRunning unit & integration tests ...\n\n"
3535
coverage run -m unittest discover -v -s $test_dir -p "test_*.py"
3636
coverage report -m --omit="*/tests/test_*,*/opt/spark-*" > "$proj_dir/logs/cov.out"
3737
COV_SCORE=`grep "TOTAL" $proj_dir/logs/cov.out | tail -1 | awk '{ printf("%d", $4) }'`
@@ -48,7 +48,7 @@ fi
4848
# Rate coding styles for all python scripts
4949
if [[ $module == "-a" || $module == "-r" ]]
5050
then
51-
printf "\nRating code style...\n\n"
51+
printf "\nRating code style ...\n\n"
5252
score=0
5353
cnt=0
5454
rm $proj_dir/logs/pylint/*.out

logs/cov.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Name Stmts Miss Co
77
/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/model.py 44 0 100%
88
/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/opt.py 157 0 100%
99
/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/timeseries.py 60 0 100%
10-
/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/tree.py 156 0 100%
10+
/media/ph33r/Data/Project/CodeLib/Git/mllib/lib/tree.py 159 0 100%
1111
---------------------------------------------------------------------------------------------
12-
TOTAL 604 0 100%
12+
TOTAL 607 0 100%

logs/pylint/lib-tree-py.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
************* Module mllib.lib.tree
2-
tree.py:93: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)
3-
tree.py:94: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)
4-
tree.py:95: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)
5-
tree.py:96: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)
2+
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)
3+
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)
4+
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)
5+
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)
66

77
--------------------------------------------------------------------
88
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

mllib/lib/tree.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- Diptesh
1515
- Madhu
1616
17-
Date: Jan 10, 2022
17+
Date: Jan 15, 2022
1818
"""
1919

2020
# pylint: disable=invalid-name
@@ -110,7 +110,7 @@ def _compute_metrics(self):
110110
self.model_summary = model_summary
111111

112112
def _ts_data_transform(self):
113-
"""Transform input data with significant lag variables. """
113+
"""Transform input data with significant lag variables."""
114114
# Determine seasonality and return seaonal lag
115115
decomposition = seasonal_decompose(self.df[self.y_var],
116116
model="additive")
@@ -172,7 +172,7 @@ def _ts_predict(self,
172172
df_pred_x = pd.DataFrame(df_op.iloc[i]).T
173173
for j, _ in enumerate(self.ts_param["ts_lag_var"]):
174174
df_pred_x["lag_" + str(self.ts_param["ts_lag_var"][j])] \
175-
= lst_lag_val[len(lst_lag_val) \
175+
= lst_lag_val[len(lst_lag_val)
176176
- self.ts_param["ts_lag_var"][j]]
177177
df_pred_x = pd.DataFrame(df_pred_x)
178178
y_hat = self.model.predict(df_pred_x[self.ts_param["ts_x_var"]])
@@ -224,10 +224,6 @@ class RandomForest(Tree):
224224
225225
Number of cross validations folds (the default is 5)
226226
227-
max_lag : int, optional
228-
229-
Maximum lag value for auto regression in timeseries (the default is 20)
230-
231227
threshold : float, optional
232228
233229
Threshold to identify significant lag values (the default is 0.05)
@@ -357,10 +353,6 @@ class XGBoost(Tree):
357353
358354
Number of cross validations folds (the default is 5)
359355
360-
max_lag : int, optional
361-
362-
Maximum lag value for auto regression in timeseries (the default is 20)
363-
364356
threshold : float, optional
365357
366358
Threshold to identify significant lag values (the default is 0.05)

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
pmdarima==1.8.0
21
xlrd==1.2.0
3-
statsmodels==0.11.0
4-
xgboost==1.5.0
5-
Cython==0.29.15
6-
pandas==1.0.1
72
PuLP==1.6.8
3+
xgboost==1.5.0
84
numpy==1.18.1
5+
statsmodels==0.11.0
6+
Cython==0.29.15
97
scipy==1.4.1
8+
pandas==1.0.1
9+
pmdarima==1.8.0
1010
scikit_learn==1.0.2

0 commit comments

Comments
 (0)