- Initial infrastructure for multivariate methods

This commit is contained in:
Petrônio Cândido 2018-02-28 14:40:03 -03:00
parent 1d583e8b0a
commit 0e2ea9927d
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,22 @@
class FLR(object):
"""Multivariate Fuzzy Logical Relationship"""
def __init__(self):
"""
Creates a Fuzzy Logical Relationship
:param LHS: Left Hand Side fuzzy set
:param RHS: Right Hand Side fuzzy set
"""
self.LHS = {}
self.RHS = None
def set_lhs(self,var,set):
self.LHS[var] = set
def set_rhs(self, set):
self.RHS = set
def __str__(self):
return str([k.name for k in self.LHS]) + " -> " + self.RHS.name

View File

View File

@ -0,0 +1,26 @@
from pyFTS.common import fts
class Variable:
def __init__(self,name, **kwargs):
self.name = name
self.alias = kwargs.get('alias', self.name)
self.data_label = kwargs.get('alias', self.name)
self.partitioner = kwargs.get('partitioner',None)
self.type = kwargs.get('type', 'common')
self.transformation = kwargs.get('transformation', None)
def __str__(self):
return self.name
class MVFTS(fts.FTS):
def __init__(self, name, **kwargs):
super(MVFTS, self).__init__(1, name, **kwargs)
self.explanatory_variables = []
self.target_variable = None
def append_variable(self, var):
self.explanatory_variables.append(var)