Sami Assagnment12
Sami Assagnment12
Sami Assagnment12
INSTITUTE OF TECHNOLOGY
Submitted by:
Name ID
March 2020
Contents
Questions...........................................................................................................................................................3
1. Explain about the Fuzzy Logic with an example.................................................................................4
1.1. Definition of fuzzy...........................................................................................................................4
1.2. What is fuzzy logic:.........................................................................................................................4
1.3. Implementation................................................................................................................................5
1.4. Fuzzy Logic Systems Architecture..................................................................................................5
1.5. Membership Function......................................................................................................................6
1.6. Example of a Fuzzy Logic System..................................................................................................7
1.7. Development....................................................................................................................................7
1.8. Application Areas of Fuzzy Logic...................................................................................................9
1.9. Advantages of FLSs.......................................................................................................................10
1.10. Disadvantages of FLSs..................................................................................................................10
2. How do you make use of Neuro fuzzy System?.................................................................................10
2.1. Neuro Fuzzy System......................................................................................................................10
3. Explain the Navie Base Algorithm......................................................................................................11
3.1. What is Naive Bayes algorithm?....................................................................................................11
3.2. How Naive Bayes algorithm works?.............................................................................................12
5. What is Tensor flow and how is it used?.............................................................................................18
5.1. What is Tensor Flow............................................................................................................................18
5.2. How Tensor flow is it used..................................................................................................................18
1.3. Implementation
It can be implemented in systems with various sizes and capabilities ranging from
small micro-controllers to large, networked, workstation-based control systems.
It can be implemented in hardware, software, or a combination of both.
Why Fuzzy Logic?
Fuzzy logic is useful for commercial and practical purposes.
It can control machines and consumer products.
It may not give accurate reasoning, but acceptable reasoning.
Fuzzy logic helps to deal with the uncertainty in engineering.
Fuzzification Module − It transforms the system inputs, which are crisp numbers, into fuzzy sets. It splits
the input signal into five steps such as: -
LP X is large Positive
MP X is medium positive
S X is small
MN X is medium negative
LN X is large negetive
Knowledge Base − It stores IF-THEN rules provided by experts.
Inference Engine − It simulates the human reasoning process by making fuzzy inference on the inputs and
IF-THEN rules.
Defuzzification Module − It transforms the fuzzy set obtained by the inference engine into a crisp value.
Membership functions allow you to quantify linguistic term and represent a fuzzy set
graphically. A membership function for a fuzzy set A on the universe of discourse X is
defined as μA:X → [0,1].
Here, each element of X is mapped to a value between 0 and 1. It is called membership
value or degree of membership. It quantifies the degree of membership of the element
in X to the fuzzy set A.
x axis represents the universe of discourse.
y axis represents the degrees of membership in the [0, 1] interval.
There can be multiple membership functions applicable to fuzzify a numerical value. Simple
membership functions are used as use of complex functions does not add more precision in
the output.
Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the
corresponding output also changes.
Let us consider an air conditioning system with 5-level fuzzy logic system. This system
adjusts the temperature of air conditioner by comparing the room temperature and the target
temperature value.
Algorithm
Define linguistic variables and terms.
Construct membership functions for them.
Construct knowledge base of rules.
Convert crisp data into fuzzy data sets using membership functions. fuzzification
Evaluate rules in the rule base. interface engine
Combine results from each rule. interface engine
Convert output data into non-fuzzy values. defuzzification
1.7. Development
RoomTemp.
Very_Cold Cold Warm Hot Very_Hot
/Target
Build a set of rules into the knowledge base in the form of IF-THEN-ELSE structures.
Automatic Gearboxes
Four-Wheel Steering
Vehicle environment control
Hi-Fi Systems
Domestic Goods
Microwave Ovens
Refrigerators
Toasters
Vacuum Cleaners
Washing Machines
Environment Control
Air Conditioners/Dryers/Heaters
Humidifiers
A neuro-fuzzy system is a fuzzy system that uses a learning algorithm derived from or
inspired by neural network theory to determine its parameters (fuzzy sets and fuzzy rules)
by processing data samples.
Neuro-fuzzy systems are basically adaptive fuzzy systems developed by exploiting the
similarities between fuzzy systems and certain forms of neural networks. Neural Networks
The neurons of NN has been designed using the concept of fuzzy set theory
An FNN has been developed in the following way:
1. Real input but fuzzy weights
2. Fuzzy inputs but real weights
3. Fuzzy inputs and fuzzy weights
Bayes theorem provides a way of calculating posterior probability P(c|x) from P(c), P(x) and
P(x|c). Look at the equation below:
Above,
Let’s understand it using an example. Below I have a training data set of weather and
corresponding target variable ‘Play’ (suggesting possibilities of playing). Now, we need to
classify whether players will play or not based on weather condition. Let’s follow the below
steps to perform it.
Step 2: Create Likelihood table by finding the probabilities like Overcast probability = 0.29
and probability of playing is 0.64.
Step 3: Now, use Naive Bayesian equation to calculate the posterior probability for each
class. The class with the highest posterior probability is the outcome of prediction.
Now, P (Yes | Sunny) = 0.33 * 0.64 / 0.36 = 0.60, which has higher probability.
Naive Bayes uses a similar method to predict the probability of different class based on
various attributes. This algorithm is mostly used in text classification and with problems
having multiple classes.
Now suppose we want to calculate the probability of playing when the weather is overcast.
Probability of playing:
The probability of a 'Yes' class is higher. So you can determine here if the weather is overcast
than players will play the sport.
Now suppose you want to calculate the probability of playing when the weather is overcast,
and the temperature is mild.
Probability of playing:
The probability of a 'Yes' class is higher. So you can say here that if the weather is
overcast than players will play the sport.
Now suppose you want to calculate the probability of playing when the weather is overcast,
and the temperature is mild.
Probability of playing:
The probability of a 'Yes' class is higher. So, you can say here that if the weather is
overcast than players will play the sport.
TensorFlow is one of the most popular open source libraries in the Machine Learning and
Deep Learning community. We see breakthroughs in diverse fields on a weekly basis and
more often than not, TensorFlow is at the heart of the final model. Open Source Python
artificial intelligence library using data flow graphs to build models. Helps to create a deep
neural network architecture. Used in language understanding, image recognition,
classification and prediction.
Since its release, the TensorFlow team has continuously worked on improving the library by
making it simpler and interactive for the users. TensorFlow Developer Summit is an event
that brings together TensorFlow users from all over the globe to see all the new products,
tools, libraries, and use cases presented by the TensorFlow team and industry leaders. In
general tensor flow is the second machine learning framework that Google created
and used to design, build, and train deep learning models.
TensorFlow provides all of this for the programmer by way of the Python language. Python is
easy to learn and work with, and provides convenient ways to express how high-level
abstractions can be coupled together. Nodes and tensors in TensorFlow are Python objects,
and TensorFlow applications are themselves Python applications.
The actual math operations, however, are not performed in Python. The libraries of
transformations that are available through TensorFlow are written as high-performance C++
binaries. Python just directs traffic between the pieces, and provides high-level programming
abstractions to hook them together.
Google eBay
Airbus DeepMind
Uber Dropbox
OpenAI Snapchat
A bunch of startups