0% found this document useful (0 votes)
78 views6 pages

ML MID-1 Question Bank

Uploaded by

inforocks86
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)
78 views6 pages

ML MID-1 Question Bank

Uploaded by

inforocks86
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/ 6

ML MID-1 Question Bank

One Mark Questions:


1. A computer program is said to learn from experience E with respect to some task T and some
performance measure P if its performance on T, as measured by P, improves with experience E.
Suppose we feed a learning algorithm a lot of historical weather data, and have it learn to predict
weather. In this setting, what is T?
2. Suppose you are working on weather prediction, and use a learning algorithm to predict tomorrow’s
temperature (in degrees Centigrade/Fahrenheit). Would you treat this as a classification or a regression
problem?
3. Suppose you are working on weather prediction, and your weather station makes one of three
predictions for each day’s weather: Sunny, Cloudy or Rainy. You’d like to use a learning algorithm
to predict tomorrow’s weather. Would you treat this as a classification or a regression problem?
4. Suppose you are working on stock market prediction, and you would like to predict the price of a
particular stock tomorrow (measured in dollars). You want to use a learning algorithm for this.
Would you treat this as a classification or a regression problem
5. Suppose you are working on stock market prediction. You would like to predict whether or not a
certain company will declare bankruptcy within the next 7 days (by training on data of similar
companies that had previously been at risk of bankruptcy). Would you treat this as a classification or a
regression problem?
6. Suppose you are working on stock market prediction, typically tens of millions of shares of Microsoft
stock are traded (i.e., bought/sold) each day. You would like to predict the number of Microsoft shares
that will be traded tomorrow. Would you treat this as a classification or a regression problem?
7. Which of these is a reasonable definition of machine learning?
(a) Machine learning is the science of programming computers.
(b) Machine learning learns from labeled data.
(c) Machine learning is the field of allowing robots to act intelligently.
(d) Machine learning is the field of study that gives computers the ability to learn without being
explicitly programmed.
8. Which of the following are supervised learning problems? (multiple may be correct)
(a) Learning to drive using a reward signal.
(b) Predicting disease from blood sample.
(c) Grouping students in the same class based on similar features.
(d) Face recognition to unlock your phone.
9. Which of the following are classification problems? (multiple may be correct)
(a) Predict the runs a cricketer will score in a particular match.
(b) Predict which team will win a tournament.
(c) Predict whether it will rain today.
(d) Predict your mood tomorrow.
10. Which of the following is a regression task? (multiple options may be correct)
(a) Predict the price of a house 10 years after it is constructed.
(b) Predict if a house will be standing 50 years after it is constructed.
(c) Predict the weight of food wasted in a restaurant during next month.
(d) Predict the sales of a new Apple product.
11. Which of the following is an unsupervised learning task? (multiple options may be correct)
(a) Group audio files based on language of the speakers.
(b) Group applicants to a university based on their nationality.
(c) Predict a student’s performance in the final exams.
(d) Predict the trajectory of a meteorite.
12. Which of the following is an unsupervised learning task? (multiple options may be correct)
(a) Group audio files based on language of the speakers.
(b) Group applicants to a university based on their nationality.
(c) Predict a student’s performance in the final exams.
(d) Predict the trajectory of a meteorite.
13. Given below is your dataset. You are using KNN regression with K=1. What is the prediction for a new
input value (3, 2)?

14. For regression, write the general predication formula for linear regression.
15. For classification, write the general predication formula for logistic regression
16. Calculate the entropy for the following data set

Patient Chest Male Smokes Exercises Heart


ID Pain Attack
1 Yes Yes No Yes Yes
2 Yes Yes Yes No Yes
3 No No Yes No Yes
4 No Yes No Yes No
5 Yes No Yes Yes Yes
6 No Yes Yes Yes No
17. Calculate the Information Gain for the attribute Male for the following data set

Patient Chest Male Smokes Exercises Heart


ID Pain Attack
1 Yes Yes No Yes Yes
2 Yes Yes Yes No Yes
3 No No Yes No Yes
4 No Yes No Yes No
5 Yes No Yes Yes Yes
6 No Yes Yes Yes No

18. Calculate the Information Gain for the attribute Smokes for the following data set
Patient Chest Male Smokes Exercises Heart
ID Pain Attack
1 Yes Yes No Yes Yes
2 Yes Yes Yes No Yes
3 No No Yes No Yes
4 No Yes No Yes No
5 Yes No Yes Yes Yes
6 No Yes Yes Yes No
19. Calculate the Information Gain for the attribute Chest Pain for the following data set

Patient Chest Male Smokes Exercises Heart


ID Pain Attack
1 Yes Yes No Yes Yes
2 Yes Yes Yes No Yes
3 No No Yes No Yes
4 No Yes No Yes No
5 Yes No Yes Yes Yes
6 No Yes Yes Yes No
20. Calculate the Information Gain for the attribute Exercises for the following data set

Patient Chest Male Smokes Exercises Heart


ID Pain Attack
1 Yes Yes No Yes Yes
2 Yes Yes Yes No Yes
3 No No Yes No Yes
4 No Yes No Yes No
5 Yes No Yes Yes Yes
6 No Yes Yes Yes No

5 Mark Questions:

1. Write your view on how machine learning programming is different from classical
programming. Write the types of machine learning and how they are different from each
other.
2. Explain the packages available for machine learning programming in python and write the
details of each package
3. Consider the following Balloons Data Set consists of four attributes (Color, Size, Act, and
Age) and a binary label (Inflated). You will identify root node of a decision tree for below
dataset using Information Gain.
The Balloons Data Set
4. Compute the linear regression equation (trendline). The trendline will be y = mx+b for some
values of m (Slope of the trendline) and b (y-intercept).

Prices for round-shaped diamonds


5. Explain KNN algorithm with example and make some reasonable remarks on K value in
KNN algorithm
6. How Logistic regression is different form linear regression and explain logistic regression
with sample example.
10 Mark Questions
1. Consider the following data set about 11 different restaurants and in particular about the kind
of restaurant (fast food, ethnic or casual dining), their prices (low, average or high), their
locations (Oakland, Shadyside or Squirrel Hill), whether they can comply with dietary
restrictions (none, vegetarian or gluten free) and whether you enjoyed them or not. The data is
reported in the following table:

Using this above dataset build a decision tree to decide whether you would enjoy a particular
restaurant or not, showing at each level how you decided which attribute to expand next.
2. Consider the following data set PlayTennis of 14 samples, four features outlook,
temperature, humidity, and wind.

Given a new instance,𝒙′ = (Outlook=Sunny, Temperature=Mild,


Humidity=Normal, Wind=Strong), predict the class (Yes/No) of given instance
𝒙′ using Naïve Bayes Algorithm.
Note:
Map rule
P(Yes|x’)=P(Sunny|Yes)*P(Mild|Yes)*P(Normal|Yes)*P(Strong|Yes)*P(Play=Yes) /P(x’)
P(No|x’)=P(Sunny|No)* P(Mild|No)*P(Normal|No)*P(Strong|No)*P(Play=No) / P(x’)

You might also like