- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

I can run it in 2.7 fine, but 3 is giving me issues

@xxauroraxx

Don't have the file open to point out exactly where, but I think it was near line 730 in ControlSystem.py or something really similar

(also not throwing, raising XD)

just checked, the repo was updated 12 days ago. Must have been using a previous version

There is no such thing as a delta function in scikit-fuzzy. All comparisons are done as floats, with inherent imprecision in the math, so any hard == comparison would fail.

You can have a membership function which is zero except for a very small range, which makes a plateau, but at the edges of said tiny plateau the result would be a fraction between 0 and 1.

@NihalKarne Floating point math is what is inherently used everywhere, I don't understand the question.

Hi - I've performed fuzzy c means clustering using cluster.cmeans. I'm specifically trying to figure out how I can get the membership probabilities for each class, for each sample point (say for two classes, for every point in my data I'm looking for two values - the probability of belonging to class 1, and the probability of belonging to class 2). Alternatively, if the algorithm doesn't use probabilities, whatever the membership value is. I can't seem to figure out how to get this - any pointers?

Hi, how can I modify the defuzzification method in this example: https://pythonhosted.org/scikit-fuzzy/auto_examples/plot_tipping_problem_newapi.html

Hello everyone, I have installed Scikit-fuzzy on my raspberry, i met the need of condition due to install Scikit, but now i don't know reason when i try to run my file.py which notified No module "Skfuzzy" and i want to know that the environment to run SciKit_Fuzzy. If some one know please comment below, because i am in need of it to make project. Thanks guys so much

@KhaiCyber Scikit-Fuzzy is not correctly installed for you. It fails to import in your project manager. Your system probably has more than one Python installation or is working from multiple virtual environments. Please direct your project manager to the Python install you put Scikit-Fuzzy in, or reinstall it there.

Hello, I need some help. I am both a beginner in python and in fuzzy logic. I have found this example : https://pythonhosted.org/scikit-fuzzy/auto_examples/plot_tipping_problem_newapi.html and read it and understood it as much as i could. However, I am not able to find any other problem/example online. As if this is the only full code available. Can anyone help me with another full coded skfuzzy example. like the irrigation problem that everyone keep on mentioning but without code. Thank you very much

ok I tried to make my own irrigation similar to tipping (using same code) and i get error at the last step .compute() : ValueError: All antecedents must have input values!. I thought it could be due to this "temp['cold'] = trimf(temp.universe, [5, 13.75, 22.5]) " but even when I changed it to this "# temp['cold'] = trimf(temp.universe, [5, 13, 22])" , still got same error. Can anyone help.

Hi I got error on this line from this example : https://scikit-fuzzy.readthedocs.io/en/stable/auto_examples/plot_tipping_problem_newapi.html

114: rule1.view()

the error is :

Out[2]:

(<Figure size 640x480 with 1 Axes>,

<matplotlib.axes._subplots.AxesSubplot at 0x7fc404563700>)

Now How I solve this error?

Also I have problem plotting this example : https://scikit-fuzzy.readthedocs.io/en/stable/auto_examples/plot_control_system_advanced.html

when I write """ ax.view_init(30, 200) """ nothing happends but I expect it draw the 3d diagram

I've built several different models in both, but I just started finding some significant discrepancies today. I am just using made up data but because of the number of rules, it can be difficult to debug. Do the differences in the second image seem too large to just be from rounding?

The differences should be in the realm of floating point error.

There may be minor inherent differences in Matlab versus Scikit-Fuzzy, if rounding is involved, because MATLAB rounds incorrectly. Specifically, MATLAB always rounds 0.5 up. IEEE correct rounding behavior - which is what Python and more importantly NumPy follow - round to the nearest even number to minimize systematic error when rounding. So Scikit-Fuzzy will round 0.5 down to 0 (nearest even int).

Hello,

I must say that i love your work! This library is simple to use, but also can fulfill most of the needs!

The only question i have is how to accomodate more than 2 statements in a rules? np.fmin and np.fmax can take only two arrays as arguments i would need three.

I am creating fuzzy apartment search engine for my university. So basically i need rules like - "IF Apartment price is in given range AND apartment size is bit low AND apartment room number is too low THEN apartment score is MEDIUM" -this one is only an example.

Any ideas for such thing? :)

Thanks!

So you would make a rule like (making up variable names)

`ctrl.Rule(price['medium'] & size['low'] & number['low'], score['medium'])`

and it should work just great!
When everything is AND connected, you don't need to concern yourself with order of operations. However, order of operations is supported via parentheticals when combining various Antecedent Terms via a complex Rule when you may want to mix OR with AND.

Give it a shot, I think that should meet your needs.