Bugfix in deffuzyfication of HOFTS, correcting the membership weighted sum

This commit is contained in:
Petrônio Cândido 2019-04-24 19:06:28 -03:00
parent 3356872eb9
commit ebdcfe228f

View File

@ -253,7 +253,7 @@ class HighOrderFTS(fts.FTS):
final = np.nanmean(midpoints) final = np.nanmean(midpoints)
if explain: self.append_log("Deffuzyfication", "By Mean: {}".format(final)) if explain: self.append_log("Deffuzyfication", "By Mean: {}".format(final))
else: else:
final = np.dot(midpoints, memberships) final = np.dot(midpoints, memberships)/np.nansum(memberships)
if explain: self.append_log("Deffuzyfication", "By Memberships: {}".format(final)) if explain: self.append_log("Deffuzyfication", "By Memberships: {}".format(final))
ret.append(final) ret.append(final)