You are on page 1of 9

SOFT COMPUTING

COM-701

Assignment no. : 01
Name : Aahib Nazir
Roll no. : 2020A1T182
Semester : 7th
Section : A2
Department: CSE
Submitted to : Dr. Surbhi Gupta

INDEX
1. Define the architecture of a perceptron? Explain Single and Multi-Layer Perceptron.
(3 marks)

2. What do you mean by linear separability? Explain Adaptive Linear Neural Networks.
(3 marks)

3. Explain the following in detail:

⦁ Fuzzy Decision Making.

⦁ Give examples of different Fuzzy Control Systems.

⦁ Fuzzification and Defuzzification.


(4 marks)
Q.1) ⦁ Define the architecture of a perceptron? Explain Single and Multi-Layer
Perceptron.

ANS) A machine-based algorithm used for supervised learning of various binary sorting tasks is
called Perceptron. Furthermore, Perceptron also has an essential role as an Artificial Neuron or
Neural link in detecting certain input data computations in business intelligence. A perceptron
model is also classified as one of the best and most specific types of Artificial Neural networks.
Being a supervised learning algorithm of binary classifiers, we can also consider it a single-layer
neural network with four main parameters: input values, weights and Bias, net sum, and an
activation function.
>>> Here’s a breakdown of its architecture :
The perceptron model begins with multiplying all input values and their weights, then adds these
values to create the weighted sum. Further, this weighted sum is applied to the activation
function ‘f’ to obtain the desired output. This activation function is also known as the step
function and is represented by ‘f.’

This step function or Activation function is vital in ensuring that output is mapped between (0,1)
or (-1,1). Take note that the weight of input indicates a node’s strength. Similarly, an input value
gives the ability the shift the activation function curve up or down.

Step 1: Multiply all input values with corresponding weight values and then add to calculate the
weighted sum. The following is the mathematical expression of it:

∑wi*xi = x1*w1 + x2*w2 + x3*w3+……..x4*w4

Add a term called bias ‘b’ to this weighted sum to improve the model’s performance.

Step 2: An activation function is applied with the above-mentioned weighted sum giving us an
output either in binary form or a continuous value as follows:

Y=f(∑wi*xi + b)
Single Layer Perceptron Model

A single-layer perceptron model is the simplest type of artificial neural network. It includes a
feed-forward network that can analyze only linearly separable objects while being dependent on
a threshold transfer function. The model returns only binary outcomes(target) i.e. 1, and 0.

The algorithm in a single-layered perceptron model does not have any previous information
initially. The weights are allocated inconsistently, so the algorithm simply adds up all the
weighted inputs. If the value of the sum is more than the threshold or a predetermined value
then the output is delivered as 1 and the single-layer perceptron is considered to be activated.

When the values of input are similar to those desired for its predicted output, then we can say
that the perceptron has performed satisfactorily. If there is any difference between what was
expected and obtained, then the weights will need adjusting to limit how much these errors
affect future predictions based on unchanged parameters.

However, since the single-layer perceptron is a linear classifier and it does not classify cases if
they are not linearly separable. So, due to the inability of the perceptron to solve problems with
linearly non-separable cases, the learning process will never reach the point with all cases
properly classified. The inability was brought to light by Minsky & Papert in 1969.

Multilayer Perceptron Model

A multi-layer perceptron model uses the backpropagation algorithm. Though it has the same
structure as that of a single-layer perceptron, it has one or more hidden layers . A multi-layer
perceptron has one input layer and for each input, there is one neuron(or node), it has one
output layer with a single node for each output and it can have any number of hidden layers and
each hidden layer can have any number of nodes

The backpropagation algorithm is executed in two phases:

● Forward phase- Activation functions propagate from the input layer to the output layer.
All weighted inputs are added to compute outputs using the sigmoid threshold.
● Backward phase- The errors between the observed actual value and the demanded
nominal value in the output layer are propagated backward. The weights and bias values
are modified to achieve the requested value. The modification is done by apportioning
the weights and bias to each unit according to its impact on the error.
Q.2) What do you mean by linear separability? Explain Adaptive Linear Neural Networks.

ANS) Linear separability is an important concept in machine learning, particularly in the field
of supervised learning. It refers to the ability of a set of data points to be separated into distinct
categories using a linear decision boundary. In other words, if there exists a straight line that can
cleanly divide the data into two classes, then the data is said to be linearly separable.

In the figure above, (A) shows a linear classification problem and (B) shows a non-linear
classification problem. In (A) our decision boundary is a linear one that completely separates the
blue dots from the green dots. In this scenario several linear classifiers can be implemented.

In (B) our decision boundary is non-linear and we would be using non-linear kernel functions
and other non-linear classification algorithms and techniques.

Adaptive Linear Neural Networks.

ADALINE (Adaptive Linear Neuron) is an artificial neural network model proposed by Bernard
Widrow and Ted Hoff in 1960. It is similar to the perceptron, but instead of a step activation
function, it uses a linear activation function.

ADALINE is a supervised learning model used to perform binary classification and linear
regression. The neural network consists of an input layer, an output layer and a feedback layer
that adjusts the weights of the input layer according to the output obtained.

The objective of ADALINE is to minimise the mean square error (MSE) between the desired
output and the actual output of the network. It does this by using the gradient descent algorithm
to adjust the input layer weights.
ADALINE is a linear model, which means that it can only learn linear relationships between
inputs and outputs. However, it can be used as a basic unit in more complex neural network
models, such as multilayer neural networks.

The units with linear activation function are called linear units. A network with a single linear unit
is called an Adaline. That is an ADALINE, the input – output relationship is linear. Adaline uses
bipolar activation function for its input signals and its target output. The weights between the
input and output are adjustable. The Adaline network may be trained using delta rule. The delta
rule may also be called as least mean square (LMS) rule or Windrow- Hoff rule. This learning
rule is found to minimize the mean-squared error between the activation and the target value.

Workflow :
Q.3) Explain the following in detail:

(i) Fuzzy Decision Making. → Fuzzy decision-making is a concept derived from fuzzy logic, a
mathematical framework for dealing with uncertainty and imprecision. Unlike traditional binary
logic, which deals with absolute true or false values (0 or 1), fuzzy logic allows for intermediate
or partially true values between 0 and 1. Fuzzy decision-making is particularly useful in
situations where information is incomplete, ambiguous, or vague.

Here's a breakdown of key components in fuzzy decision-making:

1. **Fuzzy Sets:**
- In traditional set theory, an element either belongs to a set or does not. In fuzzy set theory,
elements can belong to a set to varying degrees. Membership functions define the degree of
membership for each element, assigning a value between 0 and 1.

2. **Linguistic Variables:**
- Fuzzy logic uses linguistic variables, which represent qualitative terms rather than precise
numerical values. For example, instead of using exact values like "high" or "low," fuzzy logic
might use terms like "very high," "high," "medium," "low," and "very low."

3. **Fuzzy Rules:**
- Fuzzy decision-making involves the creation of rules that express relationships between
input variables and output variables. These rules use linguistic variables and fuzzy logic
operators (such as "and," "or," and "not") to make decisions.

4. **Fuzzy Inference System (FIS):**


- A Fuzzy Inference System is the framework that combines fuzzy rules, linguistic variables,
and fuzzy logic operators to make decisions. It takes fuzzy input, applies fuzzy rules, and
produces fuzzy output, which can then be converted into a crisp (non-fuzzy) value.

5. **Defuzzification:**
- The final step in fuzzy decision-making is defuzzification, where the fuzzy output is converted
into a specific, non-fuzzy value. Various methods, such as centroid defuzzification or maximum
membership principle, can be used for this purpose.

Fuzzy decision-making finds applications in various fields, including control systems, artificial
intelligence, decision support systems, and expert systems. It is particularly useful in situations
where human expertise and intuition play a significant role, and where information is not easily
quantifiable or precise.

For example, in a temperature control system, instead of having a rule like "IF temperature is
high, THEN increase cooling," fuzzy logic allows for rules like "IF temperature is very high AND
humidity is high, THEN increase cooling moderately." This allows for more nuanced and
human-like decision-making in uncertain or imprecise environments.
(ii) Give examples of different Fuzzy Control Systems. → Fuzzy control systems find
applications in various domains where traditional control systems may struggle with
uncertainties and imprecise information. Here are a few examples of different fuzzy control
systems:

1. **Temperature Control System:**


- In heating, ventilation, and air conditioning (HVAC) systems, fuzzy control can be applied to
regulate the temperature. Fuzzy rules can consider factors like current temperature, desired
temperature, and the rate of temperature change to adjust heating or cooling output.

2. **Car Anti-lock Braking System (ABS):**


- Fuzzy control can be used in ABS to optimize braking performance. The system considers
variables such as vehicle speed, road conditions, and brake pedal pressure to adjust the
braking force on each wheel, improving safety and stability during braking.

3. **Traffic Light Control System:**


- Fuzzy logic can be applied to control traffic lights at intersections. The system can consider
factors like traffic flow, vehicle density, and pedestrian activity to adjust the timing of traffic
signals in real-time.

4. **Elevator Control System:**


- Fuzzy logic can optimize the performance of elevator systems by considering factors like the
number of people waiting on each floor, the current position of the elevator, and historical usage
patterns to determine the most efficient floor to stop.

5. **Washing Machine Control:**


- Fuzzy control can be used in washing machines to optimize wash cycles. The system can
take into account factors like the type of fabric, level of dirtiness, and water temperature to
adjust the washing time, water usage, and detergent amount.

6. **Power System Stabilization:**


- Fuzzy control can be applied in power systems to enhance stability. It considers variables
such as generator speed, voltage, and load conditions to adjust the power output and maintain
system stability.

7. **Robotics:**
- Fuzzy control is employed in robotic systems for tasks like path planning and obstacle
avoidance. Fuzzy rules can take inputs such as distance to obstacles, robot speed, and desired
trajectory to make real-time decisions for navigation.

8. **Financial Trading Systems:**


- Fuzzy logic can be used in financial trading systems to make decisions based on imprecise
market data. Factors like price trends, trading volumes, and volatility can be considered to
determine buy/sell decisions.
(iii) Fuzzification and Defuzzification. →

Fuzzification is the process of converting crisp (clear-cut and precise) input values into fuzzy
values. In a fuzzy logic system, inputs are often linguistic variables, expressed in terms of
qualitative terms rather than precise numerical values. Fuzzification involves assigning degrees
of membership to these linguistic variables using membership functions.

Here are the key steps in the fuzzification process:

1. **Define Linguistic Variables:**


- Identify the input variables of the system and express them in terms of linguistic variables.
For example, in a temperature control system, linguistic variables for temperature might include
"low," "medium," and "high."

2. **Membership Functions:**
- Associate each linguistic variable with a membership function. A membership function
defines the degree to which an input value belongs to a particular linguistic variable. It assigns a
membership value between 0 and 1.

3. **Map Crisp Inputs to Fuzzy Sets:**


- Apply the membership functions to the actual input values to determine their degree of
membership in each linguistic variable. This mapping results in fuzzy sets that represent the
imprecision and uncertainty in the input values.

4. **Fuzzyfied Input:**
- The result of fuzzification is a set of fuzzy values for each linguistic variable, reflecting the
degree to which the input values belong to each category. These fuzzy values are then used as
inputs for the fuzzy inference system.

Defuzzification :

Defuzzification is the process of converting fuzzy output values, which are expressed in terms of
fuzzy sets, into a crisp (non-fuzzy) output value. This step is necessary to obtain a specific and
actionable result from the fuzzy inference system.

Here are the key steps in the defuzzification process:

1. **Aggregate Fuzzy Outputs:**


- After the fuzzy inference system processes the fuzzy inputs and applies fuzzy rules, it
produces fuzzy output values. These fuzzy outputs may come from different rules and represent
different linguistic variables.
2. **Fuzzy Output Sets:**
- Combine the fuzzy output values using fuzzy logic operators like "or" or "max" to create fuzzy
output sets. These sets represent the overall fuzzy output of the system.

3. **Defuzzification Method:**
- Choose a defuzzification method to convert the fuzzy output sets into a crisp output value.
Common methods include the centroid method, max membership method, and weighted
average method.

4. **Crisp Output:**
- The result of the defuzzification process is a specific, non-fuzzy output value that can be
used for decision-making or control. This crisp output represents the system's response based
on the fuzzy input and rules.

In summary, fuzzification introduces uncertainty into the input values by mapping them to fuzzy
sets, and defuzzification reverses this process to obtain a specific and actionable output from
the fuzzy inference system. These processes are fundamental to the functioning of fuzzy logic
systems, allowing them to handle imprecise and uncertain information effectively.

You might also like