def __init__(self, data, part, **kwargs): """""" super(ConstantNonStationaryPartitioner, self).__init__(name=part.name, data=data, npart=part.partitions, func=part.membership_function, names=part.setnames, prefix=part.prefix, transformation=part.transformation, indexer=part.indexer) self.sets = {} for key in part.sets.keys(): set = part.sets[key] tmp = common.FuzzySet(set.name, set.mf, set.parameters, **kwargs) self.sets[key] = tmp
def __init__(self, data, part, **kwargs): """""" super(SimpleNonStationaryPartitioner, self).__init__(name=part.name, data=data, npart=part.partitions, func=part.membership_function, names=part.setnames, prefix=part.prefix, transformation=part.transformation, indexer=part.indexer) #, preprocess=False) for key in part.sets.keys(): set = part.sets[key] tmp = common.FuzzySet(set.name, set.mf, set.parameters, **kwargs) tmp.centroid = set.centroid self.sets[key] = tmp self.ordered_sets = stationary_fs.set_ordered(self.sets)
def __init__(self, data, part, **kwargs): """""" super(PolynomialNonStationaryPartitioner, self).__init__(name=part.name, data=data, npart=part.partitions, func=part.membership_function, names=part.setnames, prefix=part.prefix, transformation=part.transformation, indexer=part.indexer, preprocess=False) self.sets = {} loc_params, wid_params = self.get_polynomial_perturbations( data, **kwargs) if self.ordered_sets is None and self.setnames is not None: self.ordered_sets = part.setnames else: self.ordered_sets = stationary_fs.set_ordered(part.sets) for ct, key in enumerate(self.ordered_sets): set = part.sets[key] loc_roots = np.roots(loc_params[ct])[0] wid_roots = np.roots(wid_params[ct])[0] tmp = common.FuzzySet( set.name, set.mf, set.parameters, location=perturbation.polynomial, location_params=loc_params[ct], location_roots=loc_roots, #**kwargs) width=perturbation.polynomial, width_params=wid_params[ct], width_roots=wid_roots, **kwargs) self.sets[set.name] = tmp