0% found this document useful (0 votes)
30 views45 pages

ML FinalUpdated 1

The document contains a series of questions related to probability, statistics, and machine learning concepts, including joint PMFs, independence of random variables, and machine learning tasks. It also covers topics such as maximum likelihood estimation, bias and variance in models, and logistic regression. The questions are formatted for an assignment submission, indicating a focus on evaluating understanding of these statistical and machine learning principles.

Uploaded by

Creativity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views45 pages

ML FinalUpdated 1

The document contains a series of questions related to probability, statistics, and machine learning concepts, including joint PMFs, independence of random variables, and machine learning tasks. It also covers topics such as maximum likelihood estimation, bias and variance in models, and logistic regression. The questions are formatted for an assignment submission, indicating a focus on evaluating understanding of these statistical and machine learning principles.

Uploaded by

Creativity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

21/09/2022, 16:17 ASSIGNMENT_I CAP535

ASSIGNMENT_I CAP535
[email protected] Switch account

Draft saved

Your email will be recorded when you submit this form

Consider two random variables X and Y with joint PMF. Are x and y 2 points

independent?

P(x=2,y=2)=1/6 & P(x=2)P(y=2)=3/16. So they are not dependent

P(x=2,y=2)=1/6 & P(x=2)P(y=2)=3/16. So they are dependent

P(x=2,y=2)=1/6 & P(x=2)P(y=2)=3/16. So they are not independent

P(x=2,y=2)=1/6 & P(x=2)P(y=2)=3/16. So they are independent

Consider two random variables X and Y with joint PMF. Find P(Y=2|X=1) 2 points

2/3

2/5

1/2

1/6

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 1/8
21/09/2022, 16:17 ASSIGNMENT_I CAP535

Consider two random variables X and Y with joint PMF. Find P(X≤2,Y≤4) 2 points

1/8

3/8

3/6

1/6

Clear selection

Which of the following is/are true about machine learning? 2 points

detect patterns in data

will not cover patterns to predict future data, or

decision making under certainty

None of these

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 2/8
21/09/2022, 16:17 ASSIGNMENT_I CAP535

Given below is the binomial distribution 1 point

The statement is true

The statement is false

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 3/8
21/09/2022, 16:17 ASSIGNMENT_I CAP535

Consider two random variables X and Y with joint PMF. Find the marginal 2 points

PMFs of Y

a b

c d

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 4/8
21/09/2022, 16:17 ASSIGNMENT_I CAP535

Consider the following training data and write the observation for the test 2 points

data. How the test data will be categorized and identify the suitable way to
find the best categorization.

Probabilistic Modelling

K-Nearest Neighbour

K-Means Clustering

Support Vector Machine

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 5/8
21/09/2022, 16:17 ASSIGNMENT_I CAP535

Given data is normally distributed 1 point

The statement is true

The statement is false

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 6/8
21/09/2022, 16:17 ASSIGNMENT_I CAP535

Consider two random variables X and Y with joint PMF. Find the marginal 2 points

PMFs of X

a b

c d

Clear selection

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 7/8
21/09/2022, 16:17 ASSIGNMENT_I CAP535

Consider Tossing a coin twice as a Random experiment. Let X be the 2 points

number of heads observed. What is the value of the random variable X

All of the above

Clear selection

Which of the following is/are not the task of machine learning? 2 points

Classification/imputation - missing inputs

Anomaly detection

Probability mass function

Sampling

Page 1 of 1

Submit Clear form

This form was created inside of SASTRA DEEMED TO BE UNIVERSITY. Report Abuse

Forms

https://docs.google.com/forms/d/e/1FAIpQLScIni5cPZgdqu7qrOxryH5mVVuzxh_xpqSLVY80fxATaupT5w/viewform 8/8
*~ ~ ~ 4G+ .,II i 85%

In 0-1 loss, what is zero and one? 2 points

0 zero percent error and 100 percent error

zero percent accuracy and 100 percent


0 accuracy

1 00 percent accuracy and zero percent


error

zero percent accuracy and 100 percent


0 error

Clear selection

Which of the following is/are not * 2 points

supervised learning problem?

Predicting loan approval based on


D historical data

Grouping people in a classroom

Predicting the gender of a person from


D images

Labelling new articles based on existing


D articles

The factors determining how well * 2 points

a machine learning algorithm will


perform are its ability to

Make the testing error small and the


Q difference between training and test
error small

Make the training error small and the


@ difference between training and test
error small

Make the training error small and the


Q difference between training and test
error large

Make the testing error small and the


Q difference between training and test
error large

In density estimation, measuring * 1 point


I

quantity is impractical.

@ The statement is true

Q The statement is false

Underfltting and overfltting occurs * 2 points

respectively

when the model obtain a sufficiently low


error value on the training set and when
0 the gap between the training error and
test error is too large

when the model obtain a sufficiently low


error value on the training set and when
0 the gap between the training error and
test error is too small

when the model is not able to obtain a


sufficiently low error value on the
@ training set and when the gap between
the training error and test error is too
large

when the model is not able to obtain a


sufficiently low error value on the
Q training set and when the gap between
the training error and test error is too
small

The train and test data are * 1 point

generated by a probability
distribution over datasets

Q statistical learning theory

@ data generating process

Q i.i.d. assumptions

Q identically distributed

Which of the following is/are true * 1 point


about bias and variance of
overfltted and underfltted models?

Underfitted models have high bias and


Overfltted models have high variance.

Underfltted models have low bias and


0 Overfltted models have low variance

Underfltted models have high bias and


0 Overfltted models have low variance

Underfltted models have low bias and


0 Overfltted models have high variance

When learning a function using * 2 points


pmodel : RAn ~ R then pmodel(x)
can be

Q density estimation

Q mass function estimation

@ both

Which of the following is/are * 2 points

regression task?

Predicting if a user would like to listen to


a newly released song or not based on
historical data.

Predicting the confirmation probability


(in fraction) of your train ticket whose
current status is waiting list based on
historical data.

Predicting if a patient has diabetes or


not based on historical medical records.

D Predicting the gender of a human

It is not possible to measure the * 1 point

performance of the transcription


task.

Q The statement is true

@ The statement is false

Suppose the marks obtained by * 2 points

randomly sampled students


follow a normal distribution with
unknown µ. A random sample of 5
marks are 30, 50, 70, 90 and 100.
Using the given samples
find the maximum likelihood
estimate for the mean.

0 70

@ 68

0 50

Q Information is not sufficient

Controlling the capacity of the * 2 points

model involves in

LI Choosing hypothesis space

0 Using non-parametric models

LI Fitting overfltted model


ASSIGNMENT_III CAP535 https://docs.google.com/forms/d/e/1FAIpQLSf39UK57RNwZTmzaw...

ASSIGNMENT_III CAP535
[email protected] Switch account Draft saved

Your email will be recorded when you submit this form

* Required

For which value of θ is the probability of the observed sample is the * 2 points

largest?

The highest value of θ is the probability of the observed sample is known as * 1 point

Bayesian Inference

Bayesian Statistics

Frequentist Statistics

Maximum A Posterior Estimation

1 of 6 09/10/22, 2:22 pm
ASSIGNMENT_III CAP535 https://docs.google.com/forms/d/e/1FAIpQLSf39UK57RNwZTmzaw...

Suppose that you would like to estimate the portion of voters in your town * 2 points

that plan to vote for Party A in an upcoming election. To do so, you take a
random sample of size n from the likely voters in the town. Since you have
a limited amount of time and resources, your sample is relatively small.
Specifically, suppose that n=20. After doing your sampling, you find out
that 6 people in your sample say they will vote for Party A.

20

0.3

3.3

2 of 6 09/10/22, 2:22 pm
ASSIGNMENT_III CAP535 https://docs.google.com/forms/d/e/1FAIpQLSf39UK57RNwZTmzaw...

Which among the given is equivalent to posterior density * 2 points

of X given Y=2, fX|Y(x|2)

Option 1 Option 2

Option 3 Option 4

3 of 6 09/10/22, 2:22 pm
ASSIGNMENT_III CAP535 https://docs.google.com/forms/d/e/1FAIpQLSf39UK57RNwZTmzaw...

which among the following illustrate the Mean Squared Error for the * 4 points

statement below.

Option 1 Option 2

Option 3 Option 4

4 of 6 09/10/22, 2:22 pm
ASSIGNMENT_III CAP535 https://docs.google.com/forms/d/e/1FAIpQLSf39UK57RNwZTmzaw...

Let T be the time that is needed for a specific task in a factory to be * 3 points

completed. In order to estimate the mean and variance of T, we observe a


random sample T1,T2,⋯,T6. Thus, Ti's are i.i.d. and have the same
distribution as T. We obtain the following values (in minutes):
18,21,17,16,24,20.
Find the values of the sample mean, the sample variance, and the sample
standard deviation for the observed sample.

18,8,2

18,9,2

19,9,3

19,8,3

The MAP estimate of the random variable X, given that we have * 2 points

observed Y=y, is given by the value of x that maximizes

fX|Y(x|y) if X is a discrete random variable, PX|Y(x|y) if X is a continuous random


variable

fX|Y(x|y) if X is a continuous random variable, PX|Y(x|y) if Y is a discrete random


variable

fX|Y(x|y) if X is a discrete random variable, PX|Y(x|y) if Y is a continuous random


variable

fX|Y(x|y) if X is a continuous random variable, PX|Y(x|y) if X is a discrete random


variable

5 of 6 09/10/22, 2:22 pm
ASSIGNMENT_III CAP535 https://docs.google.com/forms/d/e/1FAIpQLSf39UK57RNwZTmzaw...

* 4 points

1,0,1,1

0,0.02,0.1,0

0,1,2,3

1,0.2,0.1,0

Submit Page 1 of 1 Clear form

This form was created inside of SASTRA DEEMED TO BE UNIVERSITY. Report Abuse

6 of 6 09/10/22, 2:22 pm
ASSIGNMENT_4_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSeEmt5H2k816W9nCIH...

ASSIGNMENT_4_CAP535
[email protected] Switch account Saving…

* Required

Email *

[email protected]

How many number of parameters( say for eg...M features in dataset) are * 2 points

needed to update in discriminative model?

M+3

M(M+1)/2

M(M+5)/2 + 1

Which of the following methods do we use to best fit the data in Logistic * 2 points

Regression?

MLE

RMSE

both

1 of 4 20/10/22, 10:26 am
ASSIGNMENT_4_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSeEmt5H2k816W9nCIH...

True-False: Is Logistic regression a supervised machine learning * 2 points

algorithm?

True

False

True -False: IRLS uses second derivative for framing the objective function * 2 points

for linear and logistic regression

True

False

In IRLS, what will be the elements in Hessian matrix? * 2 points

First derivative elements of E(W)

Third derivative elements of E(W)

None of them

Both

Which regression technique is used multi class classification problem? * 2 points

Linear Regression

Logistic Sigmoid function

Softmax Regression

None of them

2 of 4 20/10/22, 10:26 am
ASSIGNMENT_4_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSeEmt5H2k816W9nCIH...

What will be the dimension of Target matrix when 'M' features and "K" * 2 points

classes?

MXM

KXK

MXK

None of them

True - False : Gradient Descent technique uses first derivative for updating * 2 points

weight parameters?

True

False

which matrix used in Newton Rahson method for updating 'W' parameters * 2 points

Sparse matrix

Scattered Matrix

Hessian Matrix

None of them

3 of 4 20/10/22, 10:26 am
ASSIGNMENT_4_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSeEmt5H2k816W9nCIH...

Find out one hot vector representation for K=6 in C(3) ? * 2 points

<0,0,0,0,0,1>

<0,0,1,0,0,0>

<1,0,0,0,0,0,0>

None of them

Submit Clear form

This form was created inside of SASTRA DEEMED TO BE UNIVERSITY. Report Abuse

4 of 4 20/10/22, 10:26 am
ASSIGNMENT_5_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSddPlnrW3XCbSJYH2k...

ASSIGNMENT_5_CAP535 Total points 20/20

In binary logistic regression: * 2/2

The dependent variable is continuous.

The dependent variable is divided into two equal subcategories.

The dependent variable consists of two categories.

There is no dependent variable.

Bayesian approach for logistic regression is more complex than for linear 2/2
regression

False

True

Prob regression uses * 2/2

PDF

CDF

None of them

Both

1 of 5 26/10/22, 11:33 pm
ASSIGNMENT_5_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSddPlnrW3XCbSJYH2k...

Probit activation fuction is also sigmoidal in shape * 2/2

true

false

General form of exponential family of distributions * 2/2

Option 1 Option 2

Common classes of problems in machine learning * 2/2

clustering

Regression

ClassiFcation

All of them

2 of 5 26/10/22, 11:33 pm
ASSIGNMENT_5_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSddPlnrW3XCbSJYH2k...

Laplace approximation framework * 2/2

Gaussian approximation to a probability density deFned over a set of


continuous variables

Gaussian approximation to a probability density deFned over a set of random


variables

both

none of them

Bayesian Linear Regression output obtained by * 2/2

Differentiation

Integration

Difference

Multiplication

The generalized linear model based on probit activation * 2/2

Linear Regression

Logistic Regression

Probit Regression

3 of 5 26/10/22, 11:33 pm
ASSIGNMENT_5_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSddPlnrW3XCbSJYH2k...

Probit function * 2/2

Discriminative model

Generative model

This form was created inside of SASTRA DEEMED TO BE UNIVERSITY.

4 of 5 26/10/22, 11:33 pm
ASSIGNMENT_5_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSddPlnrW3XCbSJYH2k...

5 of 5 26/10/22, 11:33 pm
ASSIGNMENT_6_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSd3VVnSJ-FRYgSXUav...

ASSIGNMENT_6_CAP535 Total points 20/20

Spare kernal Methods depends kernal evaluated * 2/2

All data points

Subset of data points

Zero data points

None of them

Alterative name for SVM * 2/2

Maximum margin classi<ers

Minimum margin classi<ers

Average margin classi<ers

All the above

SVM only used for classification problem * 2/2

True

False

1 of 4 26/10/22, 11:35 pm
ASSIGNMENT_6_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSd3VVnSJ-FRYgSXUav...

Margin is defined as * 2/2

Perpendicular distance between boundary and the closest data point

Perpendicular distance between boundary and the farthest data point

Perpendicular distance between boundary and the origin

None of them

k(x,x ') = φ(x)t ⋅ φ(x') what K(.) represents * 2/2

Kernal function

logistic sigmoid activation

Probit regression activation

None of them

What do you mean by generalization error in terms of the SVM? * 2/2

How far the hyperplane is from the support vectors

How accurately the SVM can predict outcomes for unseen data

The threshold amount of error in an SVM

2 of 4 26/10/22, 11:35 pm
ASSIGNMENT_6_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSd3VVnSJ-FRYgSXUav...

The effectiveness of an SVM depends upon: * 2/2

Selection of Kernel

Kernel Parameters

Soft Margin Parameter C

All of them

Support vectors are the data points that lie closest to the decision *2/2
surface.

True

False

If I am using all features of my dataset and I achieve 100% accuracy on *2/2


my training set, but ~70% on validation set, what should I look out for?

Under<tting

Nothing, the model is perfect

Over<tting

3 of 4 26/10/22, 11:35 pm
ASSIGNMENT_6_CAP535 https://docs.google.com/forms/d/e/1FAIpQLSd3VVnSJ-FRYgSXUav...

Which of the following are real world applications of the SVM? 2/2

Text and Hypertext Categorization

Image Classi<cation

Clustering of News Articles

All of the above

This form was created inside of SASTRA DEEMED TO BE UNIVERSITY.

4 of 4 26/10/22, 11:35 pm
ASSIGNMENT_VII CAP535 https://docs.google.com/forms/d/e/1FAIpQLSceAGbPM6SQd0kIUQg...

ASSIGNMENT_VII CAP535
[email protected] Switch account Draft saved

Your email will be recorded when you submit this form

* Required

The following table shows sample data obtained from two different fruits. * 2 points

Assume that the banana is positive and apple is negative.


Train a single layer perceptron model using the above parameters to
classify the two fruits. Using the model parameters you have obtained
classify the fruit with weight 140gm and length 17.9cm.
w1 (0) = -30, w2 (0) =300, b(0)= 50, η = 0.01

Banana

Apple

Single layer perceptrons can be used for solving XOR operations * 1 point

True

False

1 of 3 07/11/22, 2:07 pm
ASSIGNMENT_VII CAP535 https://docs.google.com/forms/d/e/1FAIpQLSceAGbPM6SQd0kIUQg...

Assume that the learning rate is 0.01, the actual output is +1 and the * 6 points

resultant is -1. what will be the updated weights of w1 (0) = -30, w2 (0)
=300, b(0)= -1230, η = 0.01 after one iteration

No change

w1 (0) = -30, w2 (0) =300, b(0)= -1230

w1 (0) = -27.72, w2 (0) =300.304, b(0)= -1229.08

w1 (0) = -20, w2 (0) =200, b(0)= -1000

For the data table given above, train a single layer perceptron model using * 2 points

the parameters (w1 (0) = -30, w2 (0) =300, b(0)= -1230, η = 0.01) to classify
the two fruits. Using the model parameters you have obtained, classify the
fruit with weight 114gm and length 15.2gm.

Banana

Apple

For the data table given above, train a single layer perceptron model using * 2 points

the parameters (w1 (0) = -30, w2 (0) =300, b(0)= -1230, η = 0.01) to classify
the two fruits. Using the model parameters you have obtained, classify the
fruit with weight 121gm and length 16.8cm.

Banana

Apple

2 of 3 07/11/22, 2:07 pm
ASSIGNMENT_VII CAP535 https://docs.google.com/forms/d/e/1FAIpQLSceAGbPM6SQd0kIUQg...

With the updated weights from previous question, what is the class of the * 2 points

following fruit 140gm and 17.9cm?

Apple

Banana

Submit Page 1 of 1 Clear form

This form was created inside of SASTRA DEEMED TO BE UNIVERSITY. Report Abuse

3 of 3 07/11/22, 2:07 pm
1/28/23, 10:37 PM Machine Learning - MCA Thalee

Machine Learning

Week 13 Assignment
Posted on December 16 : Due on December 23

NLTK stands for?

New Language Tool Kit


@ Natural Language Tool Kit
None of them

What will be the output of the following code?

import re
a=" SASTRA UNIVERSITY "
a=re.sub("\s","**",
a)
print(a)

Qe SASTRA**UNIVERSITY

SASTRAUNIVERSITY

SASTRAUNIVERSITY

None of them

What will be the output?

import re
a=" SASTRA UNIVERSITY "
a=re.sub("\s","",a)
print(a)

SASTRA**UNIVERSITY

SASTRAUNIVERSITY

SASTRA UNIVERSITY

@© SASTRAUNIVERSITY

What will be the output?

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 1/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

import re
a="123SASTRA 456UNIVERSITY "
a=re.sub("[@-9]","",a)
print(a)

@ SASTRA UNIVERSITY

I23SASTRA 456UNIVERSITY

123S456

None of them

What will be the output?

import re
a="123SASTRA 456UNIVERSITY "
a=re.sub("[*@-9]","",a)
print(a)

Qe 123456

1I23SASTRA 456UNIVERSITY

SASTRA UNIVERSITY

None of them

What will be the output?

import re
a="123SASTRA 456UNIVERSITYaaa "
a=re.sub("[4@-9a-z]","",a)
print(a)

@ 123456aaa
123456

SASTRA UNIVERSITY

None of them

What will be the output?

import string
str="aaa bbb ccc"
str="".join(i.upper() for i in str)
print(str)

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 2/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

aaa bbb ccc

@ AAA BBB CCC


aaa BBB ccc

None of them

what will be the output

import string
str="aaa!! bbb&& ccc"
str="".join(i.upper() for i in str if i not in string.punctuation)
print(str)

@ AAA BBB CCC


AAA!! BBB&& CCC
W &&
None of them

What function will be used for tokenization?

@ nitk.tokenize.word_tokenize(str)
nitk.tokenize.char_tokenize(str)

none of them

Which concept refers the conversion of noun to dictionary word?

stemming
© Lemmatiization
Stopwords removal

None of them

Week 12 Assignment
Posted on December 7 : Due on December 15

What function will be used to find how many items a tuple has?

print
rowcount

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 3/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

@ len
None of them

| What will be the output of the following code segment?

T = (‘one', ‘two', ‘three')


for item in T:
print(item)

one

two three

three

@ one two three

| What will be the output of the following code segment?

T= ('1', ‘two', '2', ‘eight’)


print(tuple(sorted(T)
))

@ (1,2, ‘eight, two’)


(1, eight, ‘2’, ‘two’)
(1, '2', ‘two’, eight’)
None of them

| from collections import Counter

print("Hello world")
T = (‘aa', 'b', ‘c', ‘b’', ‘aa’, ‘a’, ‘a')
print(Counter(T))

@ Counter({'aa:: 2, 'b': 2, ‘a’: 2,'c': 1})


Counter({'a': 4, 'b’: 2, ‘a’: 2, ‘c': 1})
None of them

| What will be the output?

T = ('red', ‘green’, ‘blue', ‘yellow’)


print(T.index('violet'
))

@ raises ‘ValueError’ exception

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 4/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

What will be the output of the following?

List = [1, 2, 3, 4, 5, 6, 7, 8, 9]
n=List[ :1]+List[6:-1]
print(n)

@ [17,8]
[1]
[1,7,8,9]
can't use -1

What will be the output?

List = [1, 2, 3, 4, 5, 6, 7, 8, 9]
n=List[@]=180
print(List)

[100]
@ [100, 2, 3, 4,5, 6, 7, 8, 9]
can't use assignment operator on list
None of them

Give true or false?

List is immutable construct.

True

@ False

Give true or false?

Tuples is immutable construct.

@ true
False

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 5/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

D = {[2,2]: 25,
True: ‘a',
‘name': ‘Bob’}
print(D)

{(2, 2): 25, True: ‘a’, ‘name’: ‘Bob}


© Typeerror: unhashable type: ‘list ‘Key must be immutable type

{[2, 2]: 25, True: ‘a’, ‘name’: Bob}


None of them

Week Tl Assignment
Posted on November 3@ : Due on December 7

Complex numbers are internally implemented as pairs of what? *

@ Floating Point numbers


Integer Numbers

Bool values
None of them

What will be the output?

x=Fraction(2,7)
print(x)

@ 2/7
7/2
2.0/7.0
0.28

What will be the output of the following?

s = “Python”
print(s[3:])

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 6/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

@ hon
h

Pyt

None of them

| What will be the output of the following?

s=“Python”
print(s.find("an"

Q-1

| What will be the output of the following program ?

x=False*88
print(x)

88
1
Qo
None of them

| T = (1, ‘abc’, 1.23, True). Is this the correct way of creation of the tuple?

No

@ Yes

| what will be the output?

T = ('red', ‘green', ‘blue’, ‘cyan')


(a, b, c) = T

print(c)

blue

green
@ Triggers ValueError: too many values to unpack

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 7/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

None of them

What will be the output?


oul
=
®

100

None of them

What will be the output?

T= ('‘a', 'b', ‘c', ‘d', ‘e', 'f')


print(T[-3:-1])

(f,e/)
@ (,e)
(d','c),'b)
None of them

What will be the output

T = (‘red', ‘green', ‘blue')


T[@] = ‘black’
print(T)

(‘black’green’blue’)
(‘black’)
@ Triggers TypeError: ‘tuple’ object does not support item assignment
None of them

Week 10 Assignment

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 8/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

Posted on November 23 : Due on November 28

| A identifier is a name given to a memory location, that is used to hold a value

True

@ False

[ Consider the following statement, What is the value of b and C?

a,b, c=31,23, “Meena”

31 and ,Meena

@ 23 and Meena
Both have same value Meena

31 and 23

| In Python reserved words can also be specified in upper case also.

True
@ False

| Find the dynamically typed Language?

Cc
C++

JAVA
@ None of them

| Triple quotation is used for specifying

Strings
@ Comments
Line continuation
All of them

| What is the output of the following code? x='A’;y=20;z=x+y;print(z)

A 20
85
@ TypeeError

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 9/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

None of them

| Blocks of code are denoted by line indentation

@ True
False

[ What is the output from the following program? print(1,2,3,4,sep='&&’)

142+3+4
10
@ 16828 3&E4
None of them

| what is the output? print("Hello world")

x="yellow" y = "green" z = x print(x, y, Z)

@ yellow green yellow


yellow green green
green green green
All of them

[ What is the output of the following expression? 6.4 — 2 ?

4.0

@ 4.4

None of them

Week 9 Assignment
Posted on November 13 : Due on November 21

Suppose you have a dataset from where you have to predict three classes. Then
which of the following configuration you should use in the output layer?

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 10/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

Activation function = sigmoid, loss function = mean squared error


Activation function = softmax, loss function = mean squared error

@ Activation function = softmax, loss function = cross entropy

Activation function = sigmoid, loss function = cross entropy

What is pooling?

Creates a pool of data in order to improve the accuracy of the alghorithm


predicting images.

@ It assists in the detection of features, even if they are distorted, in addition to


decreasing the attribute sizes, resulting in decreased computational need. It is also
very useful for extracting dominant attributes.
It assists in the detection of distorted features, in order to find dominant attributes.

Decrease the features size, in order to decrease the computional power that are
needed.

What is the biggest advantage utilizing CNN?

It has the highest accuracy among all alghoritms that predicts images.
@ Little dependence on pre processing, decreasing the needs of human effort
developing its functionalities.
It is easy to understand and fast to implement.

It works well both for Supervised and Unsupervised learning.

Which one about ‘Shared Weights’ means in CNN?

Sharing weights among the features, make it easier and faster to CNN predict the
correct image
It calculate the feature’s weights and compare with other alghorithms in order to
find the best parameters.

It means that CNN use the weights of each feature in order to find the best model to
make prediction, sharing the results and returning the average
@ It is what makes CNN ‘convolutional’. Forcing the neurons of one layer to share
weights, the forward pass becomes the equivalente of convolving a filter over the
image to produce a new image. Then the training phase become a task of learning.

Which is better truth about ReLU?

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 11/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

Helps in the detection of features, increasing the non-linearity of the


image,converting positive pixels to zero. This behavior allows you to detect
variations of attributes.
It is used to find the best features considering their correlation.
Qo Helps in the detection of features, decreasing the non-linearity of the image,
converting negative pixels to zero. This behavior allows you to detect variations of
attributes.
A technique that allows you to find outliers.

Which answer exlains better the Convolution?

© Detect key features in images, respecting their spatial boundires.


Understand the model features and selecting the best
It is the first step to use CNN.
It is a technique to standardize the dataset.

Which of the following activation function can not be used in the output layer of an
image classification model?

@ Relu
Softmax
Sigmoid
None

Which of the following is/are true anout CNN?

© Mainly to process and analyse digital images, with some success cases involving
processing voice and natural language.
It is a Multi purpose algorithm that can be used for Supervised learning.

Mainly to process and analse financial models, predicting future trends.


It is a Multi purpose algorithm that can be used for Unsupervised learning.

Week 8 Assignment

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 12/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

Posted on November 7 : Due on November 21

Which of the following algorithm is not an example of an ensemble method?

A. Extra Tree Regressor


B. Random Forest

C. Gradient Boosting
@ D. Decision Tree

Consider the 2-2-2 neural network architecture and apply Backpropagation


Algorithm to find the desired output and update the weights if required. The network
is presented with an input pattern of [0.05,0.10] and the output is [0.01,0.99]. Use the
learning rate as 0.5 and show the result of w41 and w42 after one iteration.

No change

0.56,0.51
@ 0.51,0.56
0.5,0.55

Select the following partial derivative

(x cos(y) + y) with respect to x

@ cos(y)
cos(y) x sin(y) +1
cos(y)+xsin(y)+1
sin(y)
What is true about an ensembled classifier?

1. Classifiers that are more “sure” can vote with more conviction
2. Classifiers can be more “sure” about a particular part of the space
3. Most of the times, it performs better than a single classifier

land 2

land 3

2 and 3
@ All of the above

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 13/14
1/28/23, 10:37 PM Machine Learning - MCA Thalee

[ If we didn't assign a base estimators to the bagging classifier it will use by default:

Logistic regression
Linear regression
@ Decision tree
KNN

Calculate the directional derivative of the function in the given directions and at the
stated points:

f = (3x42 - 3y*2) in the direction j at (1,2,3)

12

@ -12
-6

| Calculate the gradient of the function f(x,y) =(xA2 + Y2)%

(x2 + Y2)%
xj/(xA2 + Y2)% + yi/ (xa2 + Y2)%
x/(xA2 + Y2)%5 + y](xA2 + y2%
@ xi/(xA2 + V2) + yj/(xa2 + Y2%

[ There is feedback in final stage of backpropagation algorithm?

True

@ False

Select a point from the answers below at which the scalar field f(x, y, z) = x(A2yz -
xyA2z) decreases in the y direction

(1,-1,2)
@ (11)
(-1,1,2)
(1,0,1)

https://mca-thalee.netlify.app/subjects/ml/ml-home/ 14/14

You might also like