From afc9b219ce1829c572260d489701362aed284ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido=20de=20Lima=20e=20Silva?= Date: Fri, 26 May 2023 14:24:41 -0300 Subject: [PATCH] Update wmvfts.py - class_weights --- pyFTS/models/multivariate/wmvfts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyFTS/models/multivariate/wmvfts.py b/pyFTS/models/multivariate/wmvfts.py index a944970..cc7a5b3 100644 --- a/pyFTS/models/multivariate/wmvfts.py +++ b/pyFTS/models/multivariate/wmvfts.py @@ -82,6 +82,8 @@ class WeightedMVFTS(mvfts.MVFTS): self.flrgs[flrg.get_key()].append_rhs(flr.RHS) def classify(self, data, **kwargs): + if len(self.class_weights) == 0: + self.class_weights = {k : 1.0 for k in self.target_variable.partitioner.sets.keys()} ret = [] ndata = self.apply_transformations(data) activation = kwargs.get('activation', Activations.scale)