From ebdcfe228fd0f973b23e53b2b8cb199b0b201be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido?= Date: Wed, 24 Apr 2019 19:06:28 -0300 Subject: [PATCH] Bugfix in deffuzyfication of HOFTS, correcting the membership weighted sum --- pyFTS/models/hofts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyFTS/models/hofts.py b/pyFTS/models/hofts.py index a299543..8849e14 100644 --- a/pyFTS/models/hofts.py +++ b/pyFTS/models/hofts.py @@ -253,7 +253,7 @@ class HighOrderFTS(fts.FTS): final = np.nanmean(midpoints) if explain: self.append_log("Deffuzyfication", "By Mean: {}".format(final)) else: - final = np.dot(midpoints, memberships) + final = np.dot(midpoints, memberships)/np.nansum(memberships) if explain: self.append_log("Deffuzyfication", "By Memberships: {}".format(final)) ret.append(final)