Update wmvfts.py - class_weights

This commit is contained in:
Petrônio Cândido de Lima e Silva 2023-05-26 14:24:41 -03:00 committed by GitHub
parent 560dcfacf6
commit afc9b219ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)