Skip to content

Commit

Permalink
Update wmvfts.py - class_weights
Browse files Browse the repository at this point in the history
  • Loading branch information
petroniocandido committed May 26, 2023
1 parent 02f6022 commit b8cfea5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyFTS/models/multivariate/wmvfts.py
Expand Up @@ -69,6 +69,8 @@ def __init__(self, **kwargs):
self.shortname = "WeightedMVFTS"
self.name = "Weighted Multivariate FTS"
self.has_classification = True
self.class_weigths : dict = kwargs.get("class_weights", {})


def generate_flrg(self, flrs):
for flr in flrs:
Expand Down Expand Up @@ -98,7 +100,7 @@ def classify(self, data, **kwargs):
for k,v in _flrg.RHS.items():
classification[k] += (v / _flrg.count) * mb

classification = activation(classification)
classification = activation(classification, self.class_weigths)

ret.append(classification)

Expand Down

0 comments on commit b8cfea5

Please sign in to comment.