Introduction to Fuzzy logic, Fuzzy & Crisp sets

                            Introduction to Fuzzy Logic, Fuzzy and Crisp Sets

                                                               Fuzzy Logic

Fuzzy Logic deals with the degree of truth instead of giving exact true or false as the answer.

For better understanding in simple language, let’s discuss an example here.

There is a pear and there are two sets:

  • Set of pears
  • Set of pear cores

Now, take a bite of the pear. It will still belong to the set of pears, Right?

Just keep taking the bites and you will reach a point when just a single bite will be left, and after that, the pear will get into the set of pear cores.

Now, the area between both the sets is not clearly defined since the object can not belong to both sets. Now, consider these two sets as fuzzy sets.

                                                Fuzzy Logic Concept

Fuzzy sets provide a degree of membership to each of its member. Take ‘1’ as belonging to the set and ‘0’ as outside the set and object belonging partially to the set will have a degree between 0 to 1.

Hence, when one will take the first bite of pear, then it’s degree of membership will get changed from 1 to 0.9 and furthermore, after another bite it gets converted in 0.8 and then 0.7 and so on up to that 0.1, after which it will no longer belong to the set of pears and will get into the set of pear cores.

The number (from 0 to 1) which is assigned to the object is called the degree of membership.

                                                                       Fuzzy Sets

 In terms of Mathematics, a set is basically a collection of items.

Let’s take an example here:

As the age for giving vote is 18 years, so we have to figure out the people who are eligible for voting and who will be eligible to vote next year for 2019 elections.

For this, the people aged equal or more than 18 will pass the criteria, but people below 18 will not be considered. Even the one with 17 years of age will be marked as ineligible, even though he will be 18 till the next year (coming elections time)

sc

Hence, the fuzzy set comes into play.

It will give a degree of membership as 0.8 to people aged 16 and 0.9 to the people aged 17 years, so that we will get to know that they will be eligible for polling next year.

fuzzy

                                                                Crisp Sets

 Crisp sets are just like binary sets. It deals with true and false or 0 and 1.

I gives output direct as in or out, there is no in between.

Let’s discuss an example of a race here, according to crisp logic, a threshold will be decided, sat 0.5 and above this person will be considered as fast and below this, slow.

But in fuzzy sets, intermediate values can be discussed as fast, very fast, slow, medium.

 

                                                       Crisp Set VS Fuzzy Set           

 

        

         CRISP SET

           

         FUZZY SET

1. Crisp set deals with binary logic. Fuzzy sets can have intermediate values.
2. Values here will be exact like 0 or 1 (True or False) Values can lie between the interval of 0 and 1, like 0.4,0.6 etc.
3. It deals with boundary values, i.e certain answers. It’s having a concept of “degree of membership” and thus can deal with uncertain answers.
4. Example:  In a Race: A person can be marked as fast or slow. Example: Similarly in a Race: Marking can be done on the basis of Slow, Medium, Fast and Very Fast.

                          

 

Advertisements

Love or Lust?

Let’s speak on this topic, there is no need to hide and why/what are we hiding?

We all know that there are numerous cases nowadays in which a girl/boy is committing suicide or goes into drinking and other stuff which is making their lives totally vague. What’s the reason? Just being ditched, or a broken heart or can be many other things.

Why were you into that kind of relationship which is just a relation-“shit”. It will just make you negative. Life is having way more things instead of crying over petty things. You need to be selfish sometimes and that’s not bad (trust me) unless it’s breaking someone, find the difference between the genuine ones and others.

Later on, you will realize that everything happened for a reason. If it’s not a gift then it’s a lesson ..

What is love?

  • Love is what a MOTHER do for her CHILD :’)
  • Love is what your father has done throughout just to fulfill your every basic need 🙂
  • Love is that sweet and spicy bond we share with our siblings 😉
  • Love is being yourself with your loved ones instead of pretending to be on no. 1 on his/her list.
  • Love is being a reason behind someone’s smile… (Try doing something for an orphan once, that feeling of happiness is beyond perfect)
  • Love is doing your favorite work and getting awesome blossom results after struggling

Basically, love can’t be explained within few words, sentences or paragraph. It’s a feeling (A pure connection) which is a beautiful phase of life.

And if it’s not the reason behind your happy ending, then it’s not Love. Maybe it’s a fraud, wrong no. (As PK says :p)

So, just don’t go nuts because of any stupid reason. Think about your family and loved ones. You are really important to them and so is your happiness.

They just want to see you smile… Dude! What’s the use of those 32 white teeth (instead of eating :p ) if you are not showing them because of some temporary silly reasons…

So, just eat and say cheese… SMILE 😉

Grow up, guys..  Life is a beautiful gift given by God to each one of us. Make it count. Indulge yourself in the area of your interest and make that lesson a reason behind your will to do something. Get motivated DAILY and you will surely rock one day 🙂

Surround yourself with positive minded people, who understands you and whom you feel comfortable with. There is no need to put a mask on your face to impress someone. Your simplicity is enough for the right person 🙂

BE YOU 🙂

P.S: Life is a Beautiful Journey ❤ 

Dynamo

Dynamo is a open source implementation of a Graph Based Visual Programming Interface that’s being advanced by Autodesk.  It’s very similar to Grasshopper (which is pretty tightly integrated with Rhino).

I have followed below link to build Dynamo on Linux:

https://github.com/DynamoDS/Dynamo/wiki/Dynamo-on-Linux,-Mac

Here, I will discuss about my struggles and fruitful solution eventually 🙂

Initially, I was having mono version 3.2.8.0

Later, I installed 5.4.1.6 but I think changing the version won’t solve any problem. Still I did it using:

<

p class=”default prettyprint prettyprinted”>apt-key adv --keyserver pgp.mit.edu --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list

apt-get update

apt-get install mono-devel

                                       ***************************************************

Now, on running:

xbuild /p:Configuration=Release src/Dynamo.Mono.sln

I faced an error:

MSBUILD: error MSBUILD0000: Project file ‘src/Dynamo.Mono.sln’ not found.

Then, I cloned the repository with x.sln file in it.

git clone  https://github.com/DynamoDS/Dynamo

You can get similar error as below mentioned if the data in Dynamo.Mono.sln file is not appropriate:

Dynamo.Mono.sln: Invalid solution configuration and platform: “Release|Any CPU”

Solution file error MSB5010: No file format header found.

Now, again on running above command, I got another error:

ShapewaysClient.cs(1,7): error CS0246: The type or namespace name ‘Newtonsoft’ could not be found (are you missing a using directive or an assembly reference?)

ShapewaysClient.cs(2,7): error CS0246: The type or namespace name ‘RestSharp’ could not be found (are you missing a using directive or an assembly reference?)  

almost 8 erros

For solving this, I tried installing NuGet Packages:

 #sudo apt install nuget

After installing Newtonsoft.Json:
 #nuget install Newtonsoft.Json

Though it didn’t solve my problem completely, but now there were 4 errors instead of 8.

I even tried installing zip file for Newtonsoft from here:  https://github.com/JamesNK/Newtonsoft.Json/releases

But nothing helped.

Also to upgrade the version of Nuget, one can use:

nuget update -self

To check the version of nuget:

nuget

Later, I tried:

mcs /reference:Newtonsoft.Json.dll /reference:RestSharp.dll ShapewaysClient.cs

to solve the error. But this was also not the one I am looking for.

Now, the working solution is:

nuget restore

After this, I compiled using mono Program.exe

I again got some errors of dependencies, it got solved after insatlling them. Still I was getting errors: https://hastebin.com/avokifahuw.pas

I have read that it’s some package issue and after few searches I get to know that:
All versions of System.Net.Http are broken on Mono because they use private API available in .NET assemblies only. To workaround that Mono has to disable loading such assemblies and use always Mono’s ones.
So, I fixed it by deleting System.Net.Http.dll from bin folder.
Now, on compiling, I was getting the result.
mono Program.exe 
2.0.0.2821

I will update the blog soon with the solution 🙂

Stay tuned 😉

 

 

 

 

लुधिआना का दीवाना :)

सुबह सवेरे दिन की शुरुआत होती है कसरत से ,

जाने को हैं जगह हज़ार, आइये बात करें इन फूलों से

आ चुके हैं रोज गार्डन जहाँ गाना बजाना सब कुछ है,

सेहत के साथ साथ यहाँ मन बहलाने को बहुत कुछ है ..


अब याद करलें उस रखवाले को जिसने दुनिया बनाई है,

इस धरती पर हम सबने उसके लिए सेज सजाई है..

हिन्दू, मुस्लिम, सिख, ईसाई सब यहां पे भाई हैं,

गोविन्द गोधाम“, “जामा मस्जिद“, “दुखनिवारण“, “हौली क्रॉस चर्चसबने मन में रौनक लगाई है ..


दिन ढला, शाम हुई.. अब घूमने की बारी आई है,

किप्पस मार्किट“, “पवेलियन मॉलने शहर की शोभा बढ़आई है ..

यंगस्टर्स को ख़ास करके ये जगह भाई है,

आईरीओ वाटर फ्रंट की लेक ने लुधिआना की खूबसूरती बढ़आई है ..


भूख लगी है, अब मन में खाने की इच्छा आई है,

नॅचुरल्सपर सब लोगो ने जमके भीड़ लगाई है

ढाबा, रेस्टोरेंट, बुफे हर जगह चर्चा में आई है,

पंडित के परांठेने 24 घंटे दूकान चलाई है..


इस मनोरंजक शहर का सिर्फ आधा हिस्सा इस कविता में समाया है,

पिएयुऔर रख बाघका वर्णन इसमें हो नहीं पाया है..

हार्डिस वर्ल्डऔर टाइगर सफारीने बच्चों का मन लुभाया है,

आइये जानिये खुद से इस शहर ने क्यों दीवाना बनाया है


PS: One for my home town 🙂 I love Ludhiana ❤

Please do like: https://www.facebook.com/sscsLdh/posts/1271398396339159

Get Started!

Hey my lovely readers,

I was bit occupied earlier and was not having something spicy to share with you all. Today, I get back to work again and will surely update some new and interesting things in coming days.

To embark with, I wanna share a link with you all which can help you in understanding JavaScript in a fun way. Go through this and try each task as I did and it will surely be a wonderful experience for you all if you will do justice with the work.

https://javascript30.com/

Even you can go through Hacktoberfest for getting some stickers and T-Shirt. It’s conducted in October every month.

http://hacktoberfest.digitalocean.com/

That’s all but stay tuned .. 🙂

 

New things

Today I installed java and eclipse on windows. I was getting an error while installing eclipse due to some problem with jdk setup. So, I installed a fresh jdk8. Later on, I have to set the java environment till the java/bin.

For setting java path: https://www.javatpoint.com/how-to-set-path-in-java

As a result, eclipse started working and now I want to install Remote Server Explorer (RSE).

Now, install RSE from eclipse marketplace.  Follow this blog’s video : Installation

Now, build a connection with any remote server.

Besides, I encountered a new site for brushing up the basics of HTML and CSS. I really found it interesting and more informative.

http://learnlayout.com/

https://learn.shayhowe.com/

Apart from this I get to know about two different chat platforms for teams: Flock and HipChat.

https://flock.com/in/

https://www.atlassian.com/software/hipchat

 

 

Mother

God has sent his present,

with chubby and soft cheeks .. 😀

The lady is now a mother,

Her happiness has reached the peak .. ❤


First time the child uttered,

Though, wasn’t that quick ..

Those initials he pronounced,

Has set her expressions sleek (bright) .. 🙂


The time he gets low,

Whenever he felt weak .. 😦

Mother is the solely,

Motivation behind the seek (effort to accomplish something) .. 🙂


Whenever her goes wrong,

Protecting him from the geek ..

Only Mother is the one,

always having a peek (secret look) ..<3

PS: Another Try ❤