Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Neural Network 1

 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.

 

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.

 

 

 

 

 

 

 

What is Machine Learning

 What is Machine Learning

        Machine Learning

        enables a Machine to Automatically learn from Data,

        improve performance from an Experience and

        predict things without explicitly programmed.”






        In Simple Words, when we fed the Training Data to Machine Learning Algorithm,

ü  this algorithm will produce a mathematical model and
ü  with the help of the mathematical model,
ü  the machine will make a prediction and

ü  take a decision without being explicitly programmed.


·      
Also, during training data,

o   the more machine will work with it

o   the more it will get experience and

o   the more efficient result is produced.

Example:  

In Driverless Car, the training data is fed to an Algorithm like  

ü  how to Drive a Car on Highway, Busy and Narrow Street with factors like

·       speed limit,

·       parking,

·       stop at signals etc.

After that, a Logical and Mathematical model is created on the basis of that and after that, the car will work according to the logical model.

Also, the more data, the data is fed the more efficient output is produced.


Definition: A computer program is said to

ü  learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.

 

To have a well-defined learning problem, three features needs to be identified:

  1. The class of tasks
  2. The measure of performance to be improved
  3. The source of experience

Simple learning process

        For any learning system, we must be knowing the three elements — 

ü  T (Task)

ü  P (Performance Measure),

ü  E (Training Experience).

        At a high level,

the process of learning system looks like below fig.




The learning process starts with

ü  task T,

ü  performance measure P and

ü  training experience E and

ü  objective are to find an unknown target function.

 

The target function is

ü  an exact knowledge to be learned from the training experience and

ü  its unknown.

 

For example, in a case of credit approval,

        the learning system will have

ü  customer application records as experience and

ü  task would be to classify whether the given customer application is eligible for a loan.

So in this case,

ü     the training examples can be represented as   


ü  where

        x represents customer application details and

        y represents the status of credit approval.


        With these details, what is that exact knowledge to be learned from the training experience?

        So the target function to be learned in the credit approval learning system is a mapping function f:x →y.

        This function represents the exact knowledge defining the relationship between input variable x and output variable y.

        The learning algorithms try to guess a “hypothesis’’ function h(X) that approximates the unknown f(.).

         A hypothesis is a function that best describes the target and Hypothesis set or space H(.) is the collection of all the possible legal hypothesis.

        This is the set from which the machine learning algorithm would determine the best possible (only one) which would best describe the target function or the outputs. 

        The goal of the learning process is to find the final hypothesis that best approximates the unknown target function.

Examples

i. Checkers game: A computer program that learns to play checkers might improve its performance as measured by its ability to win at the class of tasks involving playing checkers games, through experience obtained by playing games against itself.

            A checkers learning problem:

  • Task T: playing checkers
  • Performance measure P: percent of games won against opponents
  • Training experience E: playing practice games against itself

ii.  A handwriting recognition learning problem:

  • Task T: recognizing and classifying handwritten words within images
  • Performance measure P: percent of words correctly classified
  • Training   experience E: a database of handwritten      words with                  given classifications




iii.  A robot driving learning problem:

·       Task T: driving on public four-lane highways using vision sensors

·       Performance measure P: average distance travelled before an error (as judged by human overseer)

·       Training experience E: a sequence of images and steering commands recorded while observing a human driver



YouTube Link: https://www.youtube.com/watch?v=D9PrmxQPKS0&t=80s






Source: Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow by Aurélien Géron



About Machine Learning

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