NN: Introduction to Neural Network MCQs

 NN : Introduction to Neural Network

Q1. Weights impact



For the neural network shown above, which of these statements is true?

Choose the correct answer from below:

A.    -5 weight is bad for the neural network.

B.    The neuron with weight 10 will have the most impact on the output.

C.    The neuron with weight -5 will have the most impact on the output.

D.    The neuron with weight 2 will have the most impact on the output.

Ans: B

Correct option : The neuron with weight 10 will have the most impact on the output.

Explanation :
There is no such thing that a neuron with a negative weight will be bad for the output. The negative or positive weight of a neuron simply means whether it has an increasing or decreasing effect on the output value. A neuron with the largest magnitude will have the most significant effect on the output value.

 

Q2. Calculate Forward Pass

The neuron n has the weights 1,2,3,4, and 5. The values of inputs are 4,10,5,20, and 0. We are using a linear activation function with the constant of proportionality being equal to 2 here.



The output will be:

Choose the correct answer from below:

A.    193.5

B.    59.5

C.    238

D.    119

Ans:  C

Correct option : 238

Explanation :

Multiplying weights with their corresponging inputs, and then adding everything together:

-> Output=(14+210+35+420+50)=119

But since the output is linear with a proportionality constant 2, hence :

-> Finaloutput=2119=238

 

Q3. Need for NN

Are classic ML Algorithms not powerful enough? Why exactly do we need to use Neural Networks?

Check all that apply.

Choose the correct answer from below, please note that this question may have multiple correct answers

A.    Unlike Classic ML Algos, NN does not require us to do manual feature engineering.

B.    NNs can work with both structured and unstructured data

C.    For a large dataset, classic ML Algos can outperform NNs

D.    NNs are able to work better with sparse data

Ans: A, B, D

Correct Options:-

  • Unlike Classic ML Algos, NN does not require us to do manual feature engineering.
  • NNs can work with both structured and unstructured data
  • NNs are able to work better with sparse data

Explanation:-

  • In order to create a complex decision boundary, classic ML Algorithms require us to do heavy feature engineering, manually.
    On the other hand, NN are able to find complex relations between features on their own.
  • NN are excellent in working with unstructured data (image / text / audio data), whereas classic ML algos are unable to handle this data.
  • The performance of NN might be comparable to that of classic ML Algos for small datasets.
    However, if given a big enough dataset, NNs will always give better performance.
  • NNs work better with sparse data.

 

Q4. Scale drives DL

Refer to the given plot.



Which of the following generally does not hurts an algorithm's performance, and may help significantly?

 

Choose the correct answer from below, please note that this question may have multiple correct answers

 

A.    Decreasing the size of a NN

B.    Increasing the size of a NN

C.    Decreasing the training set size

D.    Increasing the training set size

Ans: B, D

Correct Options:-

  • Increasing the size of a NN
  • Increasing the training set size

Explanation:-

  • According to the trends in the given figure, big networks usually performs better than small networks.
  • Also, bringing more data to a NN model is almost always beneficial.

 

Q5. Factors of DL performance

Which of the following factors can help achieve high performance with Deep Learning algorithms?

Choose the correct answer from below, please note that this question may have multiple correct answers

A.    Large amount of data

B.    Smaller models

C.    Better designed features to use

D.    Large models

Ans: A, D

Correct Options:-

  • Large amount of data
  • Large models

Explanation:-

  • Over the last 20 years, we have accumulated a lot of data. Traditional algorithms were not able to benefit from this. Whereas, this large amount of data has been the fundamental reason why DL took off in the past decade.
  • In order to take advantage of this large amount of data available to us, we need a big enough model also.
  • Smaller models will not be able to yeild very high performace, as they will not be able to take advantage of the large amount of data.
  • One main difference between classical ML algos and DL algos is that DL models are able to “figure out” the best features using hidden layers.

 

Q6. NN true false

Mark the following statement as true or false:-

"Neural networks are good at figuring out functions, relating an input x to an output y, given enough examples."

Choose the correct answer from below:

A.    True

B.    False

Ans: A

Correct Option: True

Explanation:

  • With NN, we don’t need to design features by ourselves.
  • The NN figures out the necessary relations given enough data.

 

Q7. Why NN

Why might Neural Networks be preferred over Classic ML Algorithms?


A. Unlike Classic ML Algos, NN does not require us to do manual feature engineering.
B. NNs can work with both structured and unstructured data 
C. For a large dataset, classic ML Algos can always outperform NNs
 

Choose the correct answer from below:

A.    Only Option A is correct

B.    Only Options A and B are correct

C.    Only Options B and C are correct

D.    All the give options are correct

 

Ans: A, B

Correct answer: Only Options A and B are correct

Explanation:

  • In order to create a complex decision boundary, classic ML Algorithms require us to do heavy feature engineering, manually. On the other hand, NN are able to find complex relations between features on their own.
  • NN are excellent in working with unstructured data (image / text / audio data), whereas classic ML algos are unable to handle this data
  • The performance of NN might be comparable to that of classic ML Algos for small datasets. However, if given a big enough dataset, NNs will always give better performance.

 Q8. Artificial neuron

Which of the following statements is/are true about a single artificial neuron?

Statements:

A. It is loosely inspired from biological neurons
B. It computes a weighted sum

C. It applies an activation function
D. It is capable of performing non-linear classification using sigmoid

 

Choose the correct answer from below:

A.    Only statement A and B are correct

B.    Only statement B,C and D are correct

C.    Only statement A, B and C are correct

D.    All the given statements are true

Ans: A, B, C

Correct answer: Only statements A, B and C are correct

Explanation:

  • The basic inspiration for artificial neurons did come from biological neurons.
    Biological neurons form a network a network within themselves.
    Each connection, like the synapses in a biological brain, can transmit a signal to other neurons.
    An artificial neuron receives signals then processes them and can signal neurons connected to it.
  • A neuron does it’s computation in 2 steps:
    1. First it computes the weighted sum as: z=w1​x1​+w2​x2​+…+wdxd​+b
    2. Then it applies an activation function on top of this sum: a=f(z)
  • A single neuron can perform binary classification if it’s activation is the sigmoid function.
    However, it cannot perform non linear classification on it’s own. We would need a network of multiple neurons to do that.

Q8. And perceptron

We want to design a perception that performs AND operation. Refer to the table below:-



For this, first, a weighted sum is calculated: z=w1​x1​+w2​x2​+b

Here, w1​ and w2​ are weights, and b is the bias for the neuron.

The activation function applied on this is as follows:-

Which of the following values of weights and bias will give the desired results?

A.    w1=1, w2=1, b=-2

B.    w1=1, w2=0, b=-2

C.    w1=2, w2=1, b=4

Ans: A

Correct answer: w1​=1,w2​=1,b=−2

Explanation:

  • For the input (0,0) the perceptron will perform calculation something like this:
    z=w1​x1​+x2​x2​+b=(1)(0)+(1)(0)+(−2)=−2
    Therefore f(z)=0
  • Similarly for the inputs (0,1) and (1,0)
    For both cases, z=−1,
    Therefore, f(z)=0
  • But for the input (1,1) the value of z=w1​.x1​+w2​.x2​+b=0
    Therefore, f(z) = 1
  • Therefore, among the options, 1,1, and -2 give the required results.
  • We can use any values for w1​,w2​, and b which satisfy our conditions and output.

Q9. Biological Neuron

Ans: A neuron takes input, processes it, and sends output to other neurons

Q10: Artificial Neuron

Ans: A simplified model of a biological neuron used in neural networks

 Q11: Dendrites

Ans: Structures that receive input signals in a neuron, akin to features in ML models

Q12: Weights

Ans: Parameters that determine the importance of features in a neural network

Q13: Activation Function

Ans: A function applied to the linear combination of inputs to introduce non-linearity

Q14: Sigmoid Function

Ans: An S-shaped activation function used in logistic regression

Q15: Nonlinearity

Ans: A characteristic of models that can handle complex patterns beyond linear relationships

Q16: Linear Regression

Ans: A model representing a linear equation without an activation function

Q17: Logistic Regression

Ans: A linear model with a sigmoid activation function

Q18: Feature Engineering

Ans: The process of creating features to improve model performance

Q19: Encoder-Decoder

Ans: Neural network model for compressing and then reconstructing data

Q20: Deep Learning

Ans: A subset of ML involving multi-layered neural networks to model complex patterns

 

Machine Learning Programs

 Machine Learning Programs

👉Data Preprocessing in Machine Learning

👉Data Preprocessing in Machine learning (Handling Missing values )

👉Linear Regression - ML Program - Weight Prediction

👉Naïve Bayes Classifier - ML Program

👉LOGISTIC REGRESSION - PROGRAM

👉KNN Machine Learning Program

👉Support Vector Machine (SVM) - ML Program

👉Decision Tree Classifier on Iris Dataset

👉Classification of Iris flowers using Random Forest

👉DBSCAN

👉 Implement and demonstrate the FIND-S algorithm for finding the most specific hypothesis based on a given set of training data samples. Read the training data from a .CSV file

👉For a given set of training data examples stored in a .CSV file, implement and demonstrate the Candidate-Elimination algorithm to output a description of the set of all hypotheses consistent with the training examples.

👉Write a program to demonstrate the working of the decision tree based ID3 algorithm. Use an appropriate data set for building the decision tree and apply this knowledge to classify a new sample.

👉Build an Artificial Neural Network by implementing the Backpropagation algorithm and test the same using appropriate data sets.

👉Write a program to construct a Bayesian network considering medical data. Use this model to demonstrate the diagnosis of heart patients using a standard Heart Disease Data Set.

👉Write a program to implement k-Nearest Neighbors algorithm to classify the iris data set. Print both correct and wrong predictions.

👉Implement the non-parametric Locally Weighted Regression algorithm in order to fit data points. Select appropriate data set for your experiment and draw graphs.

👉Write a program to implement SVM algorithm to classify the iris data set. Print both correct and wrong predictions.

👉Apply EM algorithm to cluster a set of data stored in a .CSV file. Use the same data set for clustering using k-Means algorithm. Compare the results of these two algorithms and comment on the quality of clustering.

👉 Write a program using scikit-learn to implement K-means Clustering

👉Program to calculate the entropy and the information gain

👉Program to implement perceptron.

Git & GitHub Setup for MLOps -1

                                                                Git & GitHub Setup for MLOps

Q1. Conflict in GIT

When does a conflict arise in git?

Choose the correct answer from below:

A.    Always when 2 developers raise pull requests simultaneously.
B.    Always when 2 developers change the project simultaneously.
C.    When the same line of code of a particular file is changed, in 2 different merging branches A and B.
D.    When the same file is deleted in 2 branches A and B, and we are trying to merge them.

Ans: D

Correct Option:
When the same line of code of a particular file is changed, in 2 different merging branches A and B.
Explanation:

  • Conflicts generally arise when two people have changed the same lines in a file, or if one developer deleted a file while another developer was modifying it.
  • In these cases, Git cannot automatically determine what is correct. Conflicts only affect the developer conducting the merge, the rest of the team is unaware of the conflict.
  • Git will mark the file as being conflicted and halt the merging process. It is then the developers’ responsibility to resolve the conflict.

Q2. Forking and Cloning

How is forking different from cloning?

Choose the correct answer from below, please note that this question may have multiple correct answers

A.    Cloning allows you to push and pull to the UPSTREAM repo using git pull/push commands, forking doesn’t even with pull requests.
B.    Forking creates an independent copy of someone else’s GIT repo.
C.    We can push to the UPSTREAM respository using git push command incase of forking.
D.    Cloning creates a linked copy that will be synced with the target repo.

Ans: B,D

Correct Options:

  • Forking creates an independent copy of someone else’s GIT repo.
  • Cloning creates a linked copy that will be synced with the target repo.

Explanation:

  • Using Fork operation we are creating a copy of the repository in which changes are supposed to be made and reflected without affecting the original project.
  • After making the changes we can contribute back to the original repository using Pull Requests.
  • When we create a new repository on GitHub or Any repository on Github, it exists as a remote location where our / any other repository is stored. Cloning a repository creates a local copy on our computer so that we can sync between both the local and remote locations of the repository. We can not contribute to the repository unless we are made the collaborator of the repository.
  • Cloning is an ideal case when one wants to get his own copy of a repository where he may not be contributing to the original project.

Q3. What will you do?

In Git, if you want to make your local repository reflect changes that have been made in a remote (tracked) repository, what action will you take?

Choose the correct answer from below:

A.    Pull
B.    Push
C.    Merge
D.    Clone

Ans: A

Correct Option:
Pull

Explanation:
The git pull command is used to fetch and download content from a remote repository and immediately update the local repository to match that content.

Q4. GIT clone

What action does Git Clone perform?

Choose the correct answer from below, please note that this question may have multiple correct answers

A.    Makes a local copy of the repository
B.    Creates a working directory
C.    Commits a new branch
D.    All options are correct

 

Ans: A, B

Correct Options

  • Makes a local copy of the repository
  • Creates a working directory

Explanation:

  • git clone is a Git command line utility which is used to target an existing repository and create a clone, or copy of the target repository.
  • It creates a working directory for the user which is the same as the target repository.

Q5. Git DVCS

Git is a distributed version control system because:

Choose the correct answer from below:

A.    It brings the local copy of the complete repo to every team member’s local system.
B.    It is centralized.
C.    It resides in every team member’s computer

Ans: A

Correct Option:
It brings the local copy of the complete repo to every team member’s local system.

Explanation:

  • When you have a git repository on your machine, it is self-contained. It works perfectly on its own. There’s no need to have a server running somewhere to enable you to use git.
  • A distributed version control system (DVCS) brings a local copy of the complete repository to every team member’s computer, so they can commit, branch, and merge locally. The server doesn’t have to store a physical file for each branch — it just needs the differences between each commit.

 

About Machine Learning

Welcome! Your Hub for AI, Machine Learning, and Emerging Technologies In today’s rapidly evolving tech landscape, staying updated with the ...