Skip to content

Commit

Permalink
Merge pull request #62 from Techtonique/v0250-patch
Browse files Browse the repository at this point in the history
fix DeepMTS Pt.2
  • Loading branch information
thierrymoudiki authored Oct 4, 2024
2 parents 641f06d + a2594cd commit 268b5e1
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 144 deletions.
26 changes: 0 additions & 26 deletions nnetsauce.egg-info/PKG-INFO

This file was deleted.

89 changes: 0 additions & 89 deletions nnetsauce.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion nnetsauce.egg-info/dependency_links.txt

This file was deleted.

11 changes: 0 additions & 11 deletions nnetsauce.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion nnetsauce.egg-info/top_level.txt

This file was deleted.

16 changes: 1 addition & 15 deletions nnetsauce/lazypredict/lazydeepMTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,9 @@ def fit(self, X_train, X_test, xreg=None, per_series=False, **kwargs):
custom_metric = self.custom_metric(X_test, X_pred)
else:
custom_metric = self.custom_metric(X_test_h, X_pred)
print(f"\n\n Custom metric: {custom_metric} \n\n")
CUSTOM_METRIC.append(custom_metric)
except Exception as e:
custom_metric = np.iinfo(np.float32).max
print(f"\n\n Custom metric: {custom_metric} \n\n")
CUSTOM_METRIC.append(np.iinfo(np.float32).max)

if (self.replications is not None) or (self.type_pi == "gaussian"):
Expand Down Expand Up @@ -590,11 +588,9 @@ def fit(self, X_train, X_test, xreg=None, per_series=False, **kwargs):
if self.custom_metric is not None:
try:
custom_metric = self.custom_metric(X_test, X_pred)
print(f"\n\n Custom metric: {custom_metric} \n\n")
CUSTOM_METRIC.append(custom_metric)
except Exception as e:
custom_metric = np.iinfo(np.float32).max
print(f"\n\n Custom metric: {custom_metric} \n\n")
CUSTOM_METRIC.append(custom_metric)

if self.verbose > 0:
Expand Down Expand Up @@ -961,11 +957,9 @@ def fit(self, X_train, X_test, xreg=None, per_series=False, **kwargs):
custom_metric = self.custom_metric(X_test, X_pred)
else:
custom_metric = self.custom_metric(X_test_h, X_pred)
print(f"\n\n Custom metric: {custom_metric} \n\n")
CUSTOM_METRIC.append(custom_metric)
except Exception as e:
custom_metric = np.iinfo(np.float32).max
print(f"\n\n Custom metric: {custom_metric} \n\n")
CUSTOM_METRIC.append(np.iinfo(np.float32).max)

if self.verbose > 0:
Expand All @@ -992,9 +986,7 @@ def fit(self, X_train, X_test, xreg=None, per_series=False, **kwargs):

if self.custom_metric is not None:
scores_verbose["Custom metric"] = custom_metric

print(scores_verbose)


if self.predictions:
predictions[name] = X_pred

Expand Down Expand Up @@ -1025,12 +1017,6 @@ def fit(self, X_train, X_test, xreg=None, per_series=False, **kwargs):
if self.custom_metric is not None:
scores["Custom metric"] = CUSTOM_METRIC

print(f"\n\n Scores: {scores} \n\n")
for key, value in scores.items():
print(f"\n\n Key: {key} \n\n")
print(f"\n\n Value: {value} \n\n")
print(f"\n\n len(Value): {len(value)} \n\n")

if per_series:
scores = dict_to_dataframe_series(scores, self.series_names)
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from codecs import open
from os import path

__version__ = '0.25.2'
__version__ = '0.25.3'

# get the dependencies and installs
here = path.abspath(path.dirname(__file__))
Expand Down

0 comments on commit 268b5e1

Please sign in to comment.