Class 12 AI Unit 6 Understanding Neural Networks Book Solution

A. Multiple Choice / Objective Type Questions
1. What is a neural network?
A. A biological network of neurons in the brain.
B. A machine learning model inspired by the human brain.
C. A type of computer hardware used for complex calculations.
D. A mathematical equation for linear regression.
Ans: B. A machine learning model inspired by the human brain.
2. What are neurons in a neural network?
A. Cells in the human brain.
B. Mathematical functions that process inputs and produce outputs.
C. Nodes that make up the layers of a neural network.
D. None of the above.
Ans: C. Nodes that make up the layers of a neural network.
3. What is the role of activation functions in neural networks?
A. They determine the learning rate of the network.
B. They introduce non-linearity, allowing the network to learn complex patterns.
C. They control the size of the neural network.
D. They define the input features of the network.
Ans: B. They introduce non-linearity, allowing the network to learn complex patterns.
4. What is backpropagation in neural networks?
A. The process of adjusting weights and biases to minimize the error in the network.
B. The process of propagating signals from the output layer to the input layer.
C. The process of initializing the weights and biases of the network.
D. The process of defining the architecture of the neural network.
Ans: A. The process of adjusting weights and biases to minimize the error in the network.
5. Which type of neural network is commonly used for image recognition?
A. Feedforward neural network. B. Convolutional neural network.
C. Recurrent neural network. D. Perceptron.
Ans: B. Convolutional neural network.
6. How do neural networks learn from data?
A. By adjusting their weights and biases based on the error in their predictions.
B. By memorizing the training data.
C. By using a fixed set of rules.
D. By ignoring the input data.
Ans: B. By memorizing the training data.
B. Short Answer Questions
1. What is the purpose of an activation function in a neural network?
Ans: An activation function introduces non-linearity to the output of a neuron, allowing the neural network to model complex patterns in the data.
2. How does backpropagation work in a neural network?
Ans- Backpropagation is a training algorithm for neural networks. It calculates the error between the predicted output and the actual output, then adjusts the weights and biases of the network to minimize this error.
3. What are the key components of a neural network?
Ans- The key components of a neural network include neurons, connections (weights), activation functions, and biases.
4. Describe the structure of a feedforward neural network.
Ans- A feedforward neural network consists of an input layer, one or more hidden layers, and an output layer. The input data flows from the input layer through the hidden layers to the output layer.
5. What are some common types of neural networks and their applications?
Ans- Common types of neural networks include feedforward neural networks (used for general-purpose learning tasks), convolutional neural networks (used for image recognition and computer vision), and recurrent neural networks (used for sequential data processing, such as natural language processing).
6. How does a neural network learn from data?
Ans- A neural network learns from data by adjusting its weights and biases based on the error in its predictions. Through repeated training on a dataset, the network improves its ability to make accurate predictions.
7. Differentiate between FNN and RNN.
Ans:
| FNN | RNN |
| Data flows only in one direction, from input to output. They use activation functions and weights to process information in a forward manner. | They have feedback connections that allow data to flow in a loop. If the prediction is wrong, the learning rate is employed to make small changes. Hence, making it gradually increase towards making the right prediction during the backpropagation. |
| This makes them suitable for tasks with independent inputs, classification | This feedback enables RNNs to remember prior inputs, making them ideal for tasks where context is important. |
8. What are the potential future developments and trends that will shape the evolution of neural networks?
Ans:
i) The sophisticated NN algorithms have significantly enhanced efficiency and productivity by automating tasks, streamlining processes, and optimizing resource allocation in industries ranging from manufacturing to finance.
ii) Neural networks have personalized products and services by analysing vast datasets, leading to tailored recommendations and experiences that cater to individual preferences and needs.
iii) Economically, the adoption of neural networks has spurred innovation, driven economic growth, and created new job opportunities in burgeoning fields like data science and artificial intelligence.
9. What are the four ways in which neural networks help A.I. grow?
Ans: i) Advancing Deep learning
ii) Improving Accuracy and Efficiency
iii) Supporting Autonomous Systems
iv) Personalizing Experience
C. Long Answer Questions
- Explain the concept of a neural network and its significance in machine learning. Provide examples of real-world applications where neural networks are used?
Ans: A neural network is a computer system inspired by the human brain’s biological neural networks. It consists of interconnected nodes (neurons) that process information and learn patterns from data. Neural networks are significant in machine learning because they can learn from data without being explicitly programmed. They are used in various applications, such as image recognition (e.g., facial recognition in smartphones), natural language processing (e.g., voice assistants like Siri and Alexa), and autonomous driving (e.g., Tesla’s self-driving cars).
- Describe the structure of a neural network and the role of each component, including neurons, connections, activation functions, and biases.
Ans: A neural network consists of layers of neurons organized in a specific structure. The input layer receives data, which is then passed through one or more hidden layers before reaching the output layer. Neurons in each layer are connected to neurons in the adjacent layers through connections (weights). Each neuron computes a weighted sum of its inputs, applies an activation function to produce an output, and passes this output to the next layer. Activation functions introduce non-linearity to the network, allowing it to model complex patterns. Biases are constants added to the weighted sum before applying the activation function, helping the network account for any inherent bias in the data.
- Explain how backpropagation works in neural networks and its importance in training the network.
Ans: Backpropagation is an algorithm used to train neural networks by adjusting the weights and biases based on the error in the network’s predictions. It works by first making a forward pass through the network to make predictions, then calculating the error between the predicted output and the actual output. The algorithm then makes a backward pass through the network, computing the gradient of the error with respect to each weight and bias. These gradients are used to update the weights and biases using an optimization algorithm such as gradient descent. Backpropagation is crucial for training neural networks as it allows the network to learn from the error and improve its predictions over time.
- Discuss the different types of neural networks, including feedforward neural networks, convolutional neural networks, and recurrent neural networks. Provide examples of real world applications where each type is used.
Ans: Feedforward neural networks are the simplest type of neural network and are used for general-purpose learning tasks such as classification and regression.
Convolutional neural networks (CNNs) are specialized for image recognition tasks and are used in applications like facial recognition and object detection.
Recurrent neural networks (RNNs) are designed for sequential data processing and are used in applications such as speech recognition and language translation.
D. Competency Based Questions:
- You are a data scientist working for a healthcare company, tasked with developing a neural network model to predict the likelihood of a patient having a heart attack based on their medical history. The dataset you have been provided with contains various features such as age, gender, family medical history, blood pressure, cholesterol levels, and previous medical conditions. Your task is to determine which type of neural network model would you build so that you can accurately predict whether a patient is at risk of having a heart attack.
Ans: This problem is that of binary classification so, a feedforward neural network with multiple hidden layers can be effective.
- You are planning to go out for dinner and are deciding between two restaurants. You consider three factors which are food quality, ambience, and distance. Using a neural network concept, determine the inputs and weights.
Ans:
1. Factors Influencing Decision:
- Food Quality: High (Yes: 1, No: 0)
- Ambience: Cozy (Yes: 1, No: 0)
- Distance: Nearby (Yes: 1, No: 0) 155 2.
2. Inputs:
- ( X1 = 1) (Food Quality is high)
- ( X2 = 1) (Ambience is cozy)
- ( X3 = 1 ) (Distance is nearby)
3. Weights:
- ( W1 = 3) (Food Quality importance)
- ( W2 = 2) (Ambience importance)
- ( W3 = 1) (Distance importance)
- You are deciding between two colleges and are considering three factors: academic reputation, campus facilities, and tuition fees. Using a neural network concept: What would be the inputs and weights? Apply the formula and calculate the outcome.
Ans:
Step 1: Define Inputs and Weights
- Inputs (xi):
- x1: Academic Reputation (scale of 1-10)
- x2: Campus Facilities (scale of 1 – 10)
- x3: Tuition Fees (inverted scale of 1-10, where 10 = least expensive)
- Weights (wi):
- w1: Weight assigned to academic reputation (importance of academic reputation)
- w2: Weight assigned to campus facilities.
- w3: Weight assigned to tuition fees.
Step 2: Assign Numerical Values
Let’s assume:
- Inputs for College A:
- x1 = 8 (Academic Reputation)
- x2 = 8 (Academic Reputation)
- x3 = 8 (Academic Reputation)
- Weights:
- w1 = 0.5 (Academic Reputation is moderately important)
- w2 = 0.3 (Campus Facilities are slightly less important)
- w3 = 0.2 (Tuition Fees are least important)
- Bias (b) = 1.0
Step 3: Apply the formulas
Substitute into the formula:
w1x1 + w2x2 + w3x3 + bias
= (0.5 x 8) + (0.3 x 6) + (0.2 x 7) + 1.0
= 4.0 + 1.8 + 1.4 + 1.0 = 8.2
Step 4: Interpretation
The outcome for college A is 8.2. If you calculate the same for another college and compare, the one with higher outcome score is considered better according to your weighted preference.
Final Step: Compare with College B
Repeat the calculation for College B with its respective x1, x2, x3 values to decide which college scores higher. This approach simulates how a neural network evaluates multiple inputs with varying importance to make decision,
- You work for a company that develops software for recognizing handwritten digits. Your task is to create a neural network model to accurately classify handwritten digits from the dataset. Which neural network would you use for this?
Ans: Convolutional Neural Network
- You have built a CNN model for the task in Case study – 2. List the training process that you will use to train the neural network.
Ans: Training the Model:
- Compile the model with a suitable loss function and optimizer.
- Train the model on the training dataset for a certain number of epochs.
- Monitor training progress using validation data and adjust hyperparameters accordingly.
- You want to do time series forecasting by feeding historical data into a neural network and training it to predict future values based on past observations. Which neural network should you use?
Ans: Recurrent Neural Network





