5 marks qus
1. Write a program to implement union of two fuzzy set
=>
# Example to Demonstrate the
# Union of Two Fuzzy Sets
x = dict()
z = dict()
Y = dict()
x = {"a": 0.2, "b": 0.3, "c": 0.6, "d": 0.6}
z = {"a": 0.9, "b": 0.9, "c": 0.4, "d": 0.5}
print('The First Fuzzy Set is :', x)
print('The Second Fuzzy Set is :', z)
for x_key, z_key in zip(x, z):
x_value = x[x_key]
z_value = z[z_key]
if x_value > z_value:
Y[x_key] = x_value
else:
Y[z_key] = z_value
print('Fuzzy Set Union is :', Y)
2. Compare among AI and soft computing? "Is soft computing a part of AI"- explain
=>
Artificial intelligence is a science which deals with making machine intelligence. Whereas, Soft computing is a computing model used to solve problems where human intelligence is needed.for example fuzzy logic, neural network, evolutionary algorithm etc.
We can say that AI is a collection of Machine Learning, Deep learning, Natural language processing etc. Whereas, Soft computing is a collection of Multivalued and fuzzy logic , neural network and evolutionary algorithm.
The aim of Ai is to make a machine intelligent whereas Soft computing deals with probabilities.
AI input data is appropriate data to analyze and act whereas, soft computing can handle noisy data.
=> Soft computing is based on artificial intelligence and deals with noisy data. It provides cost-effective solution to complex real-life problem for which hard computing solutions does not exist. The algorithms of soft computing are adaptive, so the current process is not affected by any change in the environment. ANN, a network of neurons that makes a human brain means a machine that can think like a human mind. So in those point of view we can say that Soft computing is based on Artificial intelligence.
3. Compare different components of biological neural network with artificial neural network
=> Neural networks were developed in the 1950s, which helps soft computing to solve real-world problems, which a computer cannot do itself. Human brain can easily describe real-world conditions but a computer cannot.
An ANN emulates a network of neurons that makes a human brain means a machine that can think like a human mind. Thereby the computer or a machine can learn things so that they can take decisions like the human brain.
The artificial neurons are connected by synapses and mimic the behavior of biological neurons. They receive a weighted input from the environment or from other neurons and use a transfer or activation function to process the sum of the inputs and transfer it to other neurons or to generate results.
The component of neural network is input, weights, activation function and bias.
4. Difference between soft computing and hard computing
=> Hard computing uses existing mathematical algorithms to solve certain problems. It provides an exact solution of the given problem. Whereas, Soft computing compute complex problems where data can be noisy data.
Soft computing takes less computational time, whereas, Hard computing takes more computational time.
In soft computing Parallel computation can be done, whereas in hard computing sequential computation is done.
Hard computing is a precise model whereas, soft computing is imprecise model.
5. Explain Perceptron Neural Network learning rule
=> A single layer neural network is called Perceptron whereas multi-layer perceptron is called neural networks.
The Perceptron consists of 4 parts I.e., 1. Input values or one input layer, 2. Weights and Bias, 3. Net sum or weighted sum , 4. Activation function.
Atfirst all the input X are multiplies with their weights w. Let’s call it K.
Add all the multiplied valued call them weighted sum.
Apply that weighted sum to the correct activation function.
A bias value allows you to shift the activation function curve up or down.
6. Write short note on recurrent neural network
=> A type of artificial neural network commonly used in speed recognition and natural language processing is called Recurrent Neural network. RNN reuse activation function from other data points in the sequence to generate the next output in a series means the output of the previous step is use as input to the current step. RNN are mainly used for Sequence classification, sequence labelling etc. In different hidden layers the calculation is done.
7. output of the following code: def f(x): def f1(*args, **kwargs): print("BWU") return x(*args, **kwargs) return f1
=>
It returns a function type like this
<function f.<locals>.f1 at 0x000001C0EABC8160>
8. Explain the taxonomy of neural network architecture
=>
Various neural network models are there from its evolution. Some of them are discussed below,
ADAPTIVE LINEAR ELEMENT (ADALINE), is a simple perceptron which can solve only linear problems.
MULTIPLE ADALINEs, is a multilayer network of ADALINE units.
Perceptrons are single layer neural network, and
Feed-forward neural network is the simplest form of neural networks.
RNN, unlike feed-forward networks, propagate data forward and also backwards from later processing stages to earlier stages.
9. Write the output of the following code L = [12, 29, 13, 23, 2]n=len(L)for i in range(n-1): for j in range(n-i-1): if L[j] > L[j+1]: L[j], L[j+1] = L[j+1], L[j]print("Sorted list is : ",L)
=>
The output is like
Sorted list is : [2, 12, 13, 23, 29]
10. Explain fuzzy relation with example
=>
A fuzzy relation is the Cartesian product of mathematical fuzzy sets. Two fuzzy sets are taken as input, the fuzzy relation is then equal to the cross product of the sets which is created by vector multiplication. A practical approach to describe a fuzzy relation is based on a 2d table. At first, a table is created which consists of fuzzy values from 0..1. The next step is to apply the if-then-rules to the values. The resulting numbers are stored in the table as an array
11. Write the code for fuzzy max-min method
=>
Fuzzy relation in different product space can be combined with each other by the operation called “Composition”. There are many composition methods in use , e.g. max-product method, max-average method and max-min method. But max-min composition method is best known in fuzzy logic applications.
R=[[0.6 0.3][ 0.2 0.9]]
And
S= [[1 0.5 0.3 ][0.8 0.4 0.7]]
MT(x1,z1)= max [min [MR(x1,y1),MS(y1,z1)] , min [MR(x1,y2),MS(y2,z1)] ]
= max [ min (0.6, 1), min (0.3,0.8)]
= max [0.6, 0.3]
= 0.6
12. Write the main disadvantages of crisp set
=>
Crisp set only have two distinct value i.e. 0 or 1 where as fuzzy set including 0 and 1 and value between them also be allowed.
Crisp set application used for digital design
Only two numbers are allowed in crisp set,
Comments
Post a Comment