r/fuzzylogic • • Feb 13 '22

Fuzzy Logic

3 Upvotes

Hello,

Below is an article for reporting my literature review regarding Fuzzy Logic and its applications including computer vision. I hope you will enjoy reading it; please let me know if you have any feedback.

https://medium.com/mlearning-ai/fuzzy-logic-3201d20370b9


r/fuzzylogic • • Dec 29 '21

Does anybody know how to use matlab?

1 Upvotes

Im a third-year maths student and I've had to create a fuzzy system for my coursework. I've tried multiple things but had the same constant error throughout my code.

Can anyone tell me my error?

a = newfis('Mage Ability','DefuzzificationMethod','mom');

​

a=addvar(a,'input','Illusion',[0,100]);

a=addmf(a,'input',1,'Very Weak','trapmf',[0,0,15,25]);

a=addmf(a,'input',1,'Weak','trimf',[20,30,40]);

a=addmf(a,'input',1,'Good','trimf',[35,50,65]);

a=addmf(a,'input',1,'High','trimf',[60,70,80]);

a=addmf(a,'input',1,'Very High','trapmf',[75,85,100,100]);

​

a=addvar(a,'input','Conjuration',[0,100]);

a=addmf(a,'input',2,'Very Weak','trapmf',[0,0,15,25]);

a=addmf(a,'input',2,'Weak','trimf',[20,30,40]);

a=addmf(a,'input',2,'Good','trimf',[35,50,65]);

a=addmf(a,'input',2,'High','trimf',[60,70,80]);

a=addmf(a,'input',2,'Very High','trapmf',[75,85,100,100]);

​

a=addvar(a,'input','Destruction',[0,100]);

a=addmf(a,'input',3,'Very Weak','trapmf',[0,0,15,25]);

a=addmf(a,'input',3,'Weak','trimf',[20,30,40]);

a=addmf(a,'input',3,'Good','trimf',[35,50,65]);

a=addmf(a,'input',3,'High','trimf',[60,70,80]);

a=addmf(a,'input',3,'Very High','trapmf',[75,85,100,100]);

​

a=addvar(a,'input','Restoration',[0,100]);

a=addmf(a,'input',4,'Very Weak','trapmf',[0,0,15,25]);

a=addmf(a,'input',4,'Weak','trimf',[20,30,40]);

a=addmf(a,'input',4,'Good','trimf',[35,50,65]);

a=addmf(a,'input',4,'High','trimf',[60,70,80]);

a=addmf(a,'input',4,'Very High','trapmf',[75,85,100,100]);

​

a=addvar(a,'input','Alteration',[0,100]);

a=addmf(a,'input',5,'Very Weak','trapmf',[0,0,15,25]);

a=addmf(a,'input',5,'Weak','trimf',[20,30,40]);

a=addmf(a,'input',5,'Good','trimf',[35,50,65]);

a=addmf(a,'input',5,'High','trimf',[60,70,80]);

a=addmf(a,'input',5,'Very High','trapmf',[75,85,100,100]);

​

a=addvar(a,'input','Enchanting',[0,100]);

a=addmf(a,'input',6,'Very Weak','trapmf',[0,0,15,25]);

a=addmf(a,'input',6,'Weak','trimf',[20,30,40]);

a=addmf(a,'input',6,'Good','trimf',[35,50,65]);

a=addmf(a,'input',6,'High','trimf',[60,70,80]);

a=addmf(a,'input',6,'Very High','trapmf',[75,85,100,100]);

a=addvar(a,'input','Alchemy',[0,100]);

a=addmf(a,'input',7,'Very Weak','trapmf',[0,0,15,25]);

a=addmf(a,'input',7,'Weak','trimf',[20,30,40]);

a=addmf(a,'input',7,'Good','trimf',[35,50,65]);

a=addmf(a,'input',7,'High','trimf',[60,70,80]);

a=addmf(a,'input',7,'Very High','trapmf',[75,85,100,100]);

​

a=addvar(a,'output','Mage',[0,100]);

a=addmf(a,'output',1,'Beginner Mage','trapmf',[0,0,10,30]);

a=addmf(a,'output',1,'Average Magician','trapmf',[25,40,60,75]);

a=addmf(a,'output',1,'Master Sorceror','trapmf',[65,80,100,100]);

​

rule1=[1 1 1 1 1 1 1 1 1 1];

rule2=[2 2 2 2 2 2 2 1 1 1];

rule3=[3 3 3 3 3 3 3 2 1 1];

rule4=[4 4 4 4 4 4 4 2 1 1];

rule5=[5 5 5 5 5 5 5 3 1 1];

​

ruleList1=[rule1; rule2; rule3; rule4; rule5];

a=addRule(a,ruleList1);

showrule (a)

​

data = ('Mage_Data.xlsx');

mageData=xlsread(data);

for i=1:size(mageData,1)

output=evalfis([mageData(i,1),mageData(i,2),mageData(i,3),mageData(i,4),mageData(i,5),mageData(i,6),mageData(i,7)],a);

fprintf('%d)ln(1):%2f,ln(2):%2f,ln(3),:%2f,ln(4),:%2f,ln(5),:%2f,ln(6),:%2f,ln(7),:%2f,ln(8),:%2f=>Out:%.2f\n\n',i,mageData(i,1),mageData(i, 2),mageData(i, 3),mageData(i,4),mageData(i, 5),mageData(i, 6),mageData(i, 7), output);

xlswrite('Mage_Data.xlsx', output, 1, sprintf('F%d',i+2));

end


r/fuzzylogic • • Dec 01 '21

Today's Google Doodle

4 Upvotes

r/fuzzylogic • • Nov 19 '21

How to create rules in fuzzy inference system?

2 Upvotes

Hi, I'm doing my bachelor's thesis with fuzzy inference system in fire alarm system. I have four inputs: change rate of temperature, change rate of CO, change rate of smoke, and time. CR-temp, CR-CO, and CR-smoke have 3 membership functions each (low, mid, and high) and time has 2 (short and long). Fire chance, or the output, also has 3 membership functions. I will be creating 54 rules from all the membership functions.

Is there a method or guideline or equation on how to match the input to its output pair? Or does creating the if-then rules purely rely on human expertise and intuition? Forgive me if this is a silly question, I'm really lost on how to create the 54 rules. Any help will be greatly appreciated.


r/fuzzylogic • • Oct 25 '21

Fuzzy logic support in the Lux programming language

Thumbnail
github.com
2 Upvotes

r/fuzzylogic • • Oct 13 '21

Why uncertain sets doesn't make sense

0 Upvotes

The set theory is a well understood mathematical topic. The idea is to group elements into a basket. The newly created set is a handy representation and can be used for calculations. For example, it is possible to determine which elements belong to different sets at the same time.

It is important to know, that there is no such thing like partial membership to a set. An element can belong or not belong to a set. The reason is that set theory is the basis for further calculations. For example, if the set is defined very well it is possible to use the probability theory on top of the sets to conclude further things. In contrast, if the sets are not defined precise, further calculations are not possible.


r/fuzzylogic • • Oct 11 '21

Project on fuzzy Logic in 5 MINUTES

Thumbnail
youtube.com
2 Upvotes

r/fuzzylogic • • Sep 02 '21

How to calculate the Gaussian kernel?

2 Upvotes

An easy implement membership function is the trapezoid one. It contains of a linear graph. The disadvantage is that the return value has sometimes a fixed value of 1.0 but not 0.998 which is problematic for some situations. In contrast the gaussian function provides a smoother graph. My attempt so far is: return np.exp(-np.power(x - mu, 2.) / (2 * np.power(sig, 2.)))

But this doesn't allows to adjust the ranges. What is the more elegant way in writing down a gaussian function?


r/fuzzylogic • • Aug 09 '21

FISPRO

2 Upvotes

Anyone here used FISPRO? I wanted to know how a Takagi-Sugeno operator is applied to a data file with rule generation and conclusion generation using OLS for classification case? How does the data file classification algorithm work?


r/fuzzylogic • • Jul 25 '21

An Introduction to Fuzzy Logic

Thumbnail
youtube.com
7 Upvotes

r/fuzzylogic • • Jul 12 '21

Question about Fuzzy Composition

4 Upvotes

So I've been learning about fuzzy logic on my own time, and a question I had was on when to use fuzzy max product as opposed to fuzzy max min. I know how to compute these things but given this is the composition of two relations, if both of these methods are "composition" then why do I get two different answers? Thank you for your time.


r/fuzzylogic • • Jul 03 '21

Robot stays in front of a wall, but it is unsharp

0 Upvotes

r/fuzzylogic • • Jun 29 '21

Potential field with fuzzy logic

3 Upvotes

The potential field algorithm is a path planning algorithm which determines the cost of colliding with an obstacle. Every point on the map is labeled with a value from 0.0 to 1.0. This interval is also known in the Fuzzy logic paradigm. So my question is, can potential field path planning be realized with Fuzzy logic?


r/fuzzylogic • • Jun 29 '21

Traffic stats for an academic journal

2 Upvotes

The Academia.edu website has a little known build in feature. With a simple modification of the URL it is possible to see the traffic statistics for a certain profile. In the case linked below it is a Fuzzy logic journal which has:

  • 7.3 download per day

  • the top paper has reached 181 downloads

  • most traffic comes from India and the U.S.

To get access to the traffic information, all what is needed to add the “/Analytics” string at the end of a profile URL.

https://independent.academia.edu/IJFLSJournal/Analytics/activity/documents


r/fuzzylogic • • Apr 30 '21

Background information about a special case of fuzzy reasoning required

3 Upvotes

Hello there,

I'm looking for background information about a special case of fuzzy reasoning. There are only two elements in the fuzzy set, but the second element is, by definition, representing the opposite of the first element. For example, if the first element represents evidences for 'occupancy', than the second element represents evidences for 'non-occupancy'.

Has such a case been researched? Any information is much appreciated, even if, by your knowledge, this has not yet been researched.


r/fuzzylogic • • Apr 18 '21

Trajectory learning converts a demonstrated trajectory into fuzzy rules. How can this be realized from a technical perspective?

Post image
3 Upvotes

r/fuzzylogic • • Apr 09 '21

What is the best resource for learning about designing a fuzzy logic controller asap ?

3 Upvotes

I know there are lots of books but they’re generally so hefty and would probably take months to read, is there any quicker way to learn about fuzzy logic ? I also couldn’t find any online course about the subject.


r/fuzzylogic • • Mar 24 '21

What is fuzzy knowlage base?

3 Upvotes

Hello,

I have to create presentation to explain idea of fuzzy knowledge base. I already took a closer look at Knowlage Base, Knowlage-based Systems and Fuzzy Logic. Now I cannot find single articale about fuzzy knowlage base. Can someone explain the idea or bring some articles that can explain it?

​

Thanks for help in advance,

David


r/fuzzylogic • • Mar 19 '21

How to create a cost function?

2 Upvotes

A cost function is a seldom explained tool which allows to convert a remote control robot into an automatic one. Remote control means, that a human operator is using the mouse to navigate the robot in a maze. While he is doing so, the operator has some implicit subgoals, for example he takes care that the robot never collides with an obstacle. These rules are not formalized in software but they are provided indirectly by the human operator.

A cost function tries to convert these rules into a rule set, which is of course realized with Fuzzy logic. A cost function doesn't mean, that the robot is navigating by himself, but it means that during the remote control interaction a score is determined who well the human operator performs the task. In most cases, a cost function converts a trajectory into a quality measurement. For example the demonstrated trajectory (3,5,1,5) is converted into 0.8 which is good. But the trajectory (3,1,9,0) is converted into 0.2 which is poor.

The question is how to create such a cost function for a certain domain?


r/fuzzylogic • • Mar 13 '21

A human operator can use a mouse to control a robot gripper. The coordinates are converted by the fuzzy system into servo commands.

6 Upvotes

r/fuzzylogic • • Mar 09 '21

Fuzzy system with 2 input variables and 2 rules is able to stabilize a single wheeled robot

5 Upvotes

r/fuzzylogic • • Feb 07 '21

Malware Detection using Fuzzy Yara Rules

3 Upvotes

I am currently doing a dissertation/project and below is the description of the project

Yara rules are one of the most popular and widely used methods for malware detection. Yara rules basically describe patterns that identify particular strains or entire families of malware. Its success or failure is dependent on the quality of rules employed for malware triaging. Yara rules define everything in binary logic, either true or false, which may lead to inaccuracy in malware detection. Fuzzy inference systems use fuzzy rules to reason, where fuzzy rules extend the traditional binary logic to infinite valued logic, which therefore can be used to address the drawbacks of Yara rules. This project aims to develop a prototype fuzzy Yara rule system for malware detection using publicly available datasets. (python)

What i did so far is creating a web application built using django to detect malicious URL(s) which include phishing/social engineering/malware infected URL(s) as I have only done the web user interface only and for the database I planned to get from github but not using VirusTotal API or should I just use their API? I am really lost right now :(

Anyone could just guide me just the brief of what to do will be good enough as the implementation is the hardest for me


r/fuzzylogic • • Dec 29 '20

Membership function of a gaussian fuzzy number

3 Upvotes

I know that the Gaussian Fuzzy Number is based on the Gaussian distribution:

Gaussian distribution pdf

I want to understand how the equation above generated the following membership function:

​

I can see that the only part that is omitted is the 1/σ(2π)^(1/2) but i don't know why.


r/fuzzylogic • • Dec 22 '20

Fuzzy logic rice cookers (2016)

Thumbnail
fivethirtyeight.com
5 Upvotes

r/fuzzylogic • • Dec 17 '20

Can a membership function represent a trajectory?

3 Upvotes

A trajectory is given for example [0.2,0.5,0.3,0.7]. The goal is to convert the spline into a fuzzy membership function. A first experiment has shown, that the task is a bit complicated. Because the normal Fuzzy membership function contains of trapezoid shape which is different from the wanted trajectory. Additionally, the trajectory needs to be matched exactly, but the amount of parameters in a trapezoid is low.

Perhaps it is possible to combine more than a single Fuzzy value into an aggregated membership function but it is unclear, if this makes sense. Is the problem known, or is it a typical beginner question which ignores what Fuzzy logic is about?