A problem with the fazzification phase of the new input

753 views
Skip to first unread message

m034...@gmail.com

unread,
Sep 8, 2017, 7:07:17 PM9/8/17
to scikit-fuzzy
Hi, 
I have modified the storage of the FRBS (instead to store antecedents, consequences ... in a graph, i store those information in an externe file). But, the 'ControlSystemSimulation' get the value 'none' for all the input's antecedents instead of the input's values (when ControlSystemSimulation._get_inputs() is called). This is the result i got for the input [0.39, 0.33, 0.59, 0.5] of the antecedents ['Sepallength', 'Sepalwidth', 'Petallength', 'Petalwidth'] :

>>> _InputAcceptor;__setitem: var.input['current']= 0.39
_InputAcceptor;_get_inputs :inputs= OrderedDict([('Sepallength', None), ('Sepalwidth', None), ('Petallength', None), ('Petalwidth', None)])
_update_unique_id=2362688929240-6447113667629917318
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_InputAcceptor;__setitem: var.input['current']= 0.33
_InputAcceptor;_get_inputs :inputs= OrderedDict([('Sepallength', None), ('Sepalwidth', None), ('Petallength', None), ('Petalwidth', None)])
_update_unique_id=2362688929240-6447113667629917318
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_InputAcceptor;_InputAcceptor;__setitem: var.input['current']= 0.59
_get_inputs :inputs= OrderedDict([('Sepallength', None), ('Sepalwidth', None), ('Petallength', None), ('Petalwidth', None)])
_update_unique_id=2362688929240-6447113667629917318
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_InputAcceptor;__setitem: var.input['current']= 0.5
_InputAcceptor;_get_inputs :inputs= OrderedDict([('Sepallength', None), ('Sepalwidth', None), ('Petallength', None), ('Petalwidth', None)])
_update_unique_id=2362688929240-6447113667629917318
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_update_to_current:antecedent.input= None
_get_inputs :inputs= OrderedDict([('Sepallength', None), ('Sepalwidth', None), ('Petallength', None), ('Petalwidth', None)])

And those are the functions I'm using (I only modified the _InputAcceptor Class :

class _InputAcceptor(object):
    """
    Set a single input value to an Antecedent in this ControlSystemSimulation.
    """
    def __init__(self, simulation):
        assert isinstance(simulation, ControlSystemSimulation)
        self.sim = simulation

    def __setitem__(self, key, value): 
        # Find the antecedent we should set the input for
        matches = [n for n in self.sim.ctrl.headerDB if n == key] #'n' is a string / 'self.sim.ctrl.headerDB' is a list of antecedents
        var= Antecedent(np.arange(0, 1.1, 0.1), matches[0])
         
        if float(value) > var.universe.max():
            if self.sim.clip_to_bounds:
                value = var.universe.max()
            else:
                raise ValueError("Input value out of bounds.  Max is %s" %
                            max(var.universe))
        if float(value) < var.universe.min():
            if self.sim.clip_to_bounds:
                value = var.universe.min()
            else:
                raise ValueError("Input value is out of bounds.  Min is %s" %
                            min(var.universe))

        var.input['current'] = value
        print("_InputAcceptor;__setitem: var.input['current']= "+str(var.input['current']))
        self.sim._update_unique_id()
        self._update_to_current()

    def _update_to_current(self): 
        # Private method, used to store the current state of the system in a
        # cache, 'current', accessible before and after the unique_id changes.
        if self.sim.unique_id == 'current':
            print("true: self.sim.unique_id == 'current'")
            return 

        # Find all antecedents
        matches = [Antecedent(np.arange(0, 1.1, 0.1),n) for n in self.sim.ctrl.headerDB]
        for antecedent in matches:
            antecedent.input[self.sim] = antecedent.input['current']
            print("_update_to_current:antecedent.input= "+str(antecedent.input[self.sim]))

    def _get_inputs(self):
        """
        Find and return all antecedent inputs available.
        """
        antecedents = [Antecedent(np.arange(0, 1.1, 0.1),n) for n in self.sim.ctrl.headerDB if n!='Ref' and n!='Class']
        inputs = OrderedDict()
        for antecedent in antecedents:            
#            print("_InputAcceptor; get_inputs:antecedent.input['current']= "+str(antecedent.input['current']))
            try:                
                inputs[antecedent.label] = antecedent.input['current']
            except AttributeError:
                # No system ID yet, because no assigned values
#                inputs[antecedent.label] = None
        print("_InputAcceptor;_get_inputs :inputs= "+str(inputs))

        return inputs

I think that the problem is with "_update_to_current" function. Any help pleaaaase !!

Joshua Warner

unread,
Sep 8, 2017, 7:52:33 PM9/8/17
to scikit-fuzzy
Could you elaborate on the reasoning behind this modification?  Do you have some case not currently handled well, due to memory concerns perhaps?  Have you experimented with the master branch - which has significant performance improvements merged in, including array inputs, which will be formally released soon?

The control module is built on the backbone of NetworkX, and modifying the approach as you appear to be attempting to do is not trivial.  The idea is that small, embedded systems could discretize their inputs to the point where they could cache all combinations of inputs, running extremely quickly using simple lookups after initial computations.  Even if that is not possible, performance during noisy sensor behavior will be hugely improved with even a relatively shallow cache.

The caching framework requires additional caution behind the scenes to ensure the input set can be added and tweaked asynchronously - changing the overall system - while all of the inputs stay up to date.  The helper hidden function _update_to_current() is essential to this task.

In theory it should be possible to modify the control module as you describe - but the I/O access penalties would be quite severe.  For it to work, your file access object(s) will need to emulate not just the ability to store values, but the full functionality exposed by the StatefulProperty (in state.py) and _InputAcceptor (in controlsystem.py) objects.

Before going much further, let's make sure this is the best path forward.

Josh

Martin Juliin

unread,
Sep 9, 2017, 5:48:47 AM9/9/17
to Joshua Warner, scikit-fuzzy
Thank you first for answering me.
I stopped at this level because I know that I will have several errors while the system can not get the input's values correctly. I face this problem since the first iteration. At first, I have used the master version of sckit-fuzzy 0.2 then i replaced it with the sckit-fuzzy 0.3 version.

I am a beginner in python development and I tried hard to adapt the package with my DB as it is, but I couldn't understand the deeply fonctionment of the network. 

Before modifying the storage as I explained, I faced an error after several iterations and I didn't understand why it was appearing since I am using the same DB with the code.

Martin Juliin

unread,
Sep 9, 2017, 10:16:05 AM9/9/17
to Joshua Warner, scikit-fuzzy
This is the controlSystem class that I used :
class ControlSystem(object):
    """
    Base class to contain a Fuzzy Control System.

    Parameters
    ----------
    rules : Rule or iterable of Rules, optional
        If provided, the system is initialized and populated with a set of
        fuzzy Rules (see ``skfuzzy.control.Rule``). This is optional. If
        omitted the ControlSystem can be built interactively.
    """

    def __init__(self, outFileName, phenotypeList, rules=None):
        """
        Initialization method for the fuzzy ControlSystem object.
        """ + '\n'.join(ControlSystem.__doc__.split('\n')[1:])
        self.outFileName=outFileName
        
        self.Refs = [] #au lieu de "label's fct"
        try:       
            f = open(outFileName +'_FuzzyPrediction.txt', 'r')
        except Exception as inst:
            print(type(inst))
            print(inst.args)
            print(inst)
            print('cannot open', outFileName +'_FuzzyPrediction.txt')
            raise 
        else:
#build the DB header
            self.headerDB = f.readline().rstrip('\n').split('\t')   #strip off first row
            print("self.headerDB= "+str(self.headerDB))
            
        f.close()
        # Construct a system from provided rules, if given
        if rules is not None:
            if hasattr(rules, '__iter__'):
                for rule in rules:
                    self.addrule(rule)
            else:
                try:
                    self.addrule(rules)
                except:
                    raise ValueError("Optional argument `rules` must be a "
                                     "FuzzyRule or iterable of FuzzyRules.")

    def rulesDB(self):
        """
         yields Rules in the fuzzy prediction file.
        """
        # We have to expose the rules in a list
        rulesDBlist=[]
        try:       
            f = open(self.outFileName +'_FuzzyPrediction.txt', 'r')
        except Exception as inst:
            print(type(inst))
            print(inst.args)
            print(inst)
            print('cannot open', outFileName +'_FuzzyPrediction.txt')
            raise 
        else:
            for i,line in enumerate(f):
                if i==0:
                    pass
                else:
                    lineList = line.strip('\n').split('\t')
                    rulesDBlist.append(lineList)
        return rulesDBlist

    @property
    def antecedents(self):
        """Generator which yields Antecedents in the system."""
        Ants=[]
        for att in self.headerDB:
            if att !='Ref' and att!='Class':
                print("antecedents: att= "+str(att))
                Ants.append(Antecedent(np.arange(0, 1.1, 0.1),att))
        return Ants

    @property
    def consequents(self,phenotypeList):
        """Generator which yields Consequents in the system."""
        Cons=[]
        for cons in phenotypeList:
            Cons.append(Consequent(np.arange(0, 1.1, 0.1),cons))
        return Cons

    @property
    def fuzzy_variables(self):
        """
        Generator which yields fuzzy variables in the system.

        This includes Antecedents, Consequents, and Intermediaries.
        """
        Vars=[]
        for Fvar in self.headerDB:
            if Fvar !='Ref' and Fvar!='Class':
                print("FuzzyVariable: att= "+str(Fvar))
                Vars.append(FuzzyVariable(np.arange(0, 1.1, 0.1),Fvar))
        return Vars    
#            if isinstance(line, FuzzyVariable):
                
    def addrule(self, rule):
        """
        Add a new rule to the system.
        """
        if not isinstance(rule, Rule):
            raise ValueError("Input rule must have a Rule object format!")
        # Ensure no label duplication
        Labels= self.Refs

        if rule.label in self.Refs:
            raise ValueError("Input rule cannot have same label, '{0}', "
                                 "as any other rule.".format(rule.label))                
        try:  
            f = open(self.outFileName +'_FuzzyPrediction.txt','a') # Outputs tab delimited text file of rule population and respective rule stats
        except Exception as inst:
            print(type(inst))
            print(inst.args)
            print(inst)
            print('cannot open', self.outFileName +'_FuzzyPrediction.txt')
            raise

#        if (not hasattr(rule.antecedent, '__iter__')):
        f.write(str(rule.label)+'\t')
        
        for i,ant in enumerate(self.headerDB):
            if (ant in str(rule.antecedent)) and ant!='Ref' and ant!='Class':
                f.write(str(rule.antecedent)[str(rule.antecedent).index("[")+1:-1]+'\t')
            elif ant=='Ref' or ant== 'Class':
                pass
            else:
                f.write('None'+'\t')
        cons= int(str(rule.consequent[0]).index("["))
        f.write(str(rule.consequent[0])[0:cons-len(str(rule.consequent[0])) ]+'\n')
     
        f.close()
        self.Refs.append(rule.label)
        print("rulesDB Labels= "+str(self.Refs))
        print("self.rulesDB= "+str(self.rulesDB()))

Joshua Warner

unread,
Sep 10, 2017, 12:53:14 AM9/10/17
to scikit-fuzzy
What I'm still having difficulty understanding is what drove/drives you go down this road.  If you need to mate scikit-fuzzy with an existing database or workflow, it's straightforward to query and store the outputs from the system as designed; if this isn't ideally performant upgrades are in the pipeline.

My suspicion is that you're making it far more difficult for yourself by doing this.  Where did you run into difficulty using the control module as designed?

Martin Juliin

unread,
Sep 10, 2017, 8:16:35 PM9/10/17
to Joshua Warner, scikit-fuzzy
Ok, I will try again -with the existing control module- as you suggested me. I am so thankful for your help.

Martin Juliin

unread,
Sep 12, 2017, 1:03:01 PM9/12/17
to Joshua Warner, scikit-fuzzy
I need to build the control system interactively. After building the knowledge base with fuzzy rules, the algorithm gets an input from the dataset to predict its class each iteration. But i have this error : 
>>>AttributeError: type object 'ControlSystemSimulation' has no attribute 'input'
I am using the following code :

from skfuzzy import control as ctrl

class Prediction:
...
        rules=[]
        if cons.PopFuzzification == True: 

            print("********Fuzzify the population ...**************")
            for i, cl in enumerate(population.popSet): #the population here is the set of initial rules

#-------------------building the Control system-----------------------------------------------------------------------------
                Fuzzy_rule=self.FuzzyRule(cl,i) #'cl' is an instance with a set of antecedents and a concequence
                rules.append(Fuzzy_rule)
                
            print("*******build the knowledge base*********")
            classifing_ctrl = ctrl.ControlSystem(rules)        
            ctrl.ControlSystemSimulation(classifing_ctrl)   
            cons.PopFuzzification = False 
            
#-----------------New Input--------------------------------------------------------
        print("*******Fuzzify the new input******")
        for spec, att in enumerate(cons.trainDBHeaderList):
            ctrl.ControlSystemSimulation.input[att]=input_cond[spec]
>>>

I defined the control system as an attribute of the class Prediction  : self.classifing_ctrl=ctrl.ControlSystem() /And/ self.classifing = ctrl.ControlSystemSimulation(self.classifing_ctrl). But it doesn't work either.  Can you advise me haw can I built the ControlSystem interactively.


Martin Juliin

unread,
Sep 12, 2017, 1:54:47 PM9/12/17
to Joshua Warner, scikit-fuzzy
I have only access to its functions (but any attribute).

Martin Juliin

unread,
Sep 12, 2017, 5:12:16 PM9/12/17
to Joshua Warner, scikit-fuzzy
Hi,
I reset the control module as you suggested. It works perfectly at the first iteration but it bugs since the second. My algorithm consists to build the knowledge base KB from a set of rules (population). Then, the knowledge base will be incremented with the new input. Once the system predict the class of the input, it will be saved in the KB. The system receives a new input ... This is why i set the ControlSystem and the ControlSystemSimulation as attributes of the class 'Prediction' (to be visible to all the functions).
This is the code I am using :
>>>
from skfuzzy import control as ctrl
class Prediction:
    def __init__(self, population, input_Ant):  #'population' is a list of normal rules

        self.classifing_ctrl=ctrl.ControlSystem()
        self.classifing = ctrl.ControlSystemSimulation(self.classifing_ctrl)
        cons.timer.startTimePredicting()       
               
        if cons.PopFuzzification == True: #to be sure that the population is fuzzified only one time
            rules=[ ]

            print("*************Fuzzify the population ...**************")
            for i, cl in enumerate(population):   
                rules.append(self.FuzzyRule(cl,i)) #a function which return a fuzzy rule 

            print("*************build the knowledge base*********")               
            self.classifing_ctrl = ctrl.ControlSystem(rules)  
            cons.PopFuzzification = False      
        self.classifing=ctrl.ControlSystemSimulation(self.classifing_ctrl)
            

        print("*******Fuzzify the new input******")
        for spec, att in enumerate(cons.trainDbHeaderList):
            print("att %s and its value= %f"%(att,input_cond[spec]))
            self.classifing.input[att]=input_Ant[spec]
... >>>

And to save the new input in the KB I used those lines of code (from an other file):
>>>
from exstracs_prediction import Prediction
from skfuzzy import control as ctrl
... 
rule=Prediction.FuzzyRule(newCl,newCl,index)  #self.FuzzyRule(newCl,index) 
Prediction.classifing_ctrl = ctrl.ControlSystem(rule)
>>>

But at the second iteration,  the KB was empty and the ControlSystemSimulation is unable to extract antecedents to set the values of the new input in. And this what I get when I print lines from : _InputAcceptor._get_inputs :
>>>
_InputAcceptor;_get_inputs :antecedents= []
_InputAcceptor;_get_inputs :inputs= OrderedDict()

Can you help me please to build the ControlSystemSimulation interactively in my situation? 

Joshua Warner

unread,
Sep 12, 2017, 7:51:57 PM9/12/17
to Martin Juliin, scikit-fuzzy
At a basic level, the ControlSystem object is designed to be interactive and mutable, allowing interactive creation and modification of all aspects of a control system.  However, it only defines the system - no data.

In contrast, the ControlSystemSimulation is not mutable.  Once instantiated with a ControlSystem, you should consider that ControlSystemSimulation essentially 'frozen' in overall network architecture (changes in Rules, Antecedents, Consequents, and any Terms they contain).  So, all of the changes you would make with a ControlSystem are no longer possible.

Essentially, the idea is you experiment until you get a system you want with a ControlSystem, and then you set it up to run data through with one or more simulations.  The input data can be changed in the ControlSystemSimulation, but not the overall system architecture.

If you want to change the ControlSystem architecture interactively, that's fine - but after any changes you'll need to create a new ControlSystemSimulation object afterward.

Does that answer your question?

Martin Juliin

unread,
Sep 13, 2017, 1:51:59 AM9/13/17
to Joshua Warner, scikit-fuzzy
I understand what you meant and I rebuilt a new ControlSystemSimulation after adding a new rule to the ControlSystem. The ControlSystemSimulation initialized the antecedents of the new input but is still unable to set the values in. I have the following print :
>>>
rule[1] : IF Sepallength[poor] AND Sepalwidth[poor] AND Petallength[poor] AND Petalwidth[poor] THEN Iris-setosa[medium] with weight= 0.00667%  #the rule is added succefully to the ControlSystem

_InputAcceptor;_get_inputs :inputs= OrderedDict([('Petalwidth', None), ('Petallength', None), ('Sepalwidth', None), ('Sepallength', None)])
_InputAcceptor;_get_inputs :inputs= OrderedDict()

*******Fuzzify the new input******
_InputAcceptor;__setitem: [key, value] = Sepallength, 0.14
_InputAcceptor;_get_inputs :inputs= OrderedDict()
_InputAcceptor;__setitem: [key, value] = Sepalwidth, 0.42
_InputAcceptor;_get_inputs :inputs= OrderedDict()
... >>>

Martin Juliin

unread,
Sep 13, 2017, 5:50:12 AM9/13/17
to Joshua Warner, scikit-fuzzy
Yes yes I rebuilt the ControlSystemSimulation after adding any new rule to the ControlSystem . I really appreciate your help in resolving my problem

Martin Juliin

unread,
Sep 14, 2017, 8:22:41 PM9/14/17
to Joshua Warner, scikit-fuzzy
Sorry for asking too much but I have one more issue :
The ControlSystem doen't works When I added a rule each iteration (addRuleit keeps only the last added rule) this is why I append this rule in a list so at each iteration a new ControlSystem is build and then a new ControlSystemSimulation.If there is a better way 

After that, an assertion error is displayed. This error is rised by this code line in __setitem__ in _InputAcceptor :
>>>assert len(matches) == 1            #where matches = [n for n in self.sim.ctrl.graph.nodes()  if isinstance(n, Antecedent) and n.label == key]
Can you please explain to me why this condition is essential ? because when i commented this line the system works but takes a very long time.

Joshua Warner

unread,
Sep 15, 2017, 12:43:25 AM9/15/17
to scikit-fuzzy
The traceback didn't come through in a usable way, but I think I follow.  Yes, there is a better way.

Every time the ControlSystem is initialized, it's completely fresh.  You need to preserve that object and use it repeatedly.  Only the ControlSystemSimulation need be rebuilt.

Martin Juliin

unread,
Sep 15, 2017, 2:36:33 AM9/15/17
to Joshua Warner, scikit-fuzzy
Normally when i add a new rule to the ControlSystem i need to just write "ControlSystem (newRule)" so that it will call addRule fuction to add the new rule's graph to the graph of the ControlSystem. But i conserves only the last added rule.

Joshua Warner

unread,
Sep 15, 2017, 2:39:43 AM9/15/17
to scikit-fuzzy
That's not how it works.  You can start with an empty or partially populated system and then add rules with the appropriate class method.  

What you describe creates a new system every time with that single rule.

Martin Juliin

unread,
Sep 18, 2017, 5:29:18 PM9/18/17
to Joshua Warner, scikit-fuzzy
Thank you for your support, now the system works without any error but it takes too much time. I would like to optimise it : 

I'm thinking about a way to select rules from the ControlSystem which matches the most closely the new input. Is it possible to test rules before the aggregation step? by using a specific threshold for the membership list in "_MembershipValueAccessor.__getitem__"?
 

Joshua Warner

unread,
Sep 20, 2017, 7:47:46 PM9/20/17
to Martin Juliin, scikit-fuzzy
Quite a while back I thought about implementing something like this.  Theoretically there are a lot of zero-valued rules being calculated.  There's definitely the potential for performance gains.

The issue is to make it perform well enough across the board.  Small systems - averaging say 3 membership functions per Antecedent, like the Tipping Problem - need to run every input through every rule.  So all of these sort of checks are pure bloat, and serve only to increase runtime.  But for more complicated systems, they end up worthwhile.

The second issue is that individual fuzzy membership functions can have arbitrary values between 0 and 1.  So every time a fuzzy rule is set, it would need to be carefully inspected to determine the range(s) where it is nonzero and thus needs to be calculated; these interval(s) then need to be maintained.  This is not a simple task, though it is doable.  The real issue is that there can be many, many such intervals; the input must be checked against many more than one of them. 

I don't want to discourage you; there is definite potential to the idea, and I'd really like to see it implemented and benchmarked against the current state of the package.  However, it does need some cautious thought.  Hopefully sharing those thoughts helps you or a future contributor along ;)

Martin Juliin

unread,
Sep 22, 2017, 10:53:55 AM9/22/17
to Joshua Warner, scikit-fuzzy
Yes, your explanations make things more clear to me. I already thought about a simple test to do before passing through the inference phase. The idea - like I said in the last email - is to check the list of membership function values (given after running the input through each rule). If the number of 0 is repeated more than the half ( or any number) of the number of antecedents, we ignore this rule and pass to the next one.

In my case, to gain time I checked if the rule matches the input or not by testing the crisp values of antecedents (before the fuzzification phase). I shared my suggestion only with the purpose to improve the Sckit-Fuzzy package. I am thinking also about an optimisation of the accumulation step (I think that something is wrong with it because I didn't get the desired result). I will inform you of any progress. 

Joshua Warner

unread,
Sep 22, 2017, 11:44:00 AM9/22/17
to Martin Juliin, scikit-fuzzy
I don't think I would do it that way.  Remember, Antecedent membership functions combine using arbitrary combinations of Boolean logic.  Sometimes a single zero will wipe out the Rule; other times you could have all but one be zero and the Rule could still fire at 1.0.  The point to safely check is per-membership function, and shortcut that membership function only if the input is outside the relevant region.

Please file a GitHub Issue for any problems you encounter.  It should be noted that Scikit-Fuzzy is much more accurate in sparse systems than many other fuzzy logic packages, and this creates small differences.  Against other similarly accurate fuzzy logic packages, no discrepancies are known.

Martin Juliin

unread,
Oct 2, 2017, 7:23:39 PM10/2/17
to Joshua Warner, scikit-fuzzy
Your answers are always detailed and clear. I believe in the accuracy of Scikit-Fuzzy package and I hope that I will be useful for its enhancement.

 I am a little unquiet about its result; I followed your suggestions but I get only 50 out of 150 inputs correctly classified (using different combination of the inference steps). For the case of multi-classes, I tested all aggregation operators (AND, OR, Mult) with all the defuzzification methods using weighted rules with a single class and even with changing the weight formula => all the tests have approximately similar results. There are several possible classes and I concluded that only the inputs with a specific class are correctly classified. 

I have no more ideas to test, can you help me please ! 

Joshua Warner

unread,
Oct 2, 2017, 9:10:00 PM10/2/17
to Martin Juliin, scikit-fuzzy
When you say 'correctly' classified, are we talking about known results via other fuzzy inference systems or that you're trying to build a classifier using scikit-fuzzy with real data?

Because the former is a bug report, while the latter means to take a good hard look at your data and system.

I cannot really help more than that without the system and ideally data to test against.

Martin Juliin

unread,
Oct 3, 2017, 1:58:17 AM10/3/17
to Joshua Warner, scikit-fuzzy
Yes, I am building a classifier. My algorithm is a machine learning algorithm. Thus, in the training phase, the class of the rules is known. And the predicted class is the class with maximum defuzzification value.

Josh Warner

unread,
Oct 3, 2017, 2:17:52 AM10/3/17
to Martin Juliin, Joshua Warner, scikit-fuzzy
Sounds like you might want the fuzzy C-means algorithm in skfuzzy.cluster.

Martin Juliin

unread,
Oct 3, 2017, 2:34:10 AM10/3/17
to Josh Warner, Joshua Warner, scikit-fuzzy
There is no need to use a clustering algorithm. I have already the list of possible classes.

Martin Juliin

unread,
Oct 16, 2017, 2:55:14 PM10/16/17
to Josh Warner, Joshua Warner, scikit-fuzzy
Finally, I solved the issue I faced. I have one last request. I will be thankful if you explain to me the "accumulation" step in compute_rule function. In the theory the accumulation phase consists in accumulating the output of each rule and yields one only output to be defuzzified in the next step, as shown in the following picture( mentioned aggregation in the picture) :  
aggregation_2.png
Reply all
Reply to author
Forward
0 new messages