Data Science for Engineers | Week 7

Session: JAN-APR 2024

Course Name: Data Science for Engineers

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Data Science for Engineers Assignment 7 Answers


Q1. Which among the following is not a type of cross-validation technique?
LOOCV
k-fold croos validation
Validation set approach
Bias variance trade off

Answer: d) Bias variance trade off


Q2. Which among the following is a classification problem?
Predicting the average rainfall in a given month.
Predicting whether a patient is diagnosed with a disease or not.
Predicting the price of a house.
Predicting whether it will rain or not tomorrow.

Answer: b, d


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Data Science for Engineers Assignment 7 Answers


Q3. Consider the following confusion matrix for the classication of Hatchback and SUV:
Find the accuracy of the model.

0.95
0.55
0.45
0.88

Answer: a) 0.95


Q4. Find the sensitivity of the model.
0.95
0.55
1
0.88

Answer: c) 1


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Data Science for Engineers Assignment 7 Answers


Q5. Under the ‘family’ parameter of glm() function, which one of the following distributions correspond to logistic regression for a variable with binary output?
Binomial
Gaussian
Gamma
Poisson

Answer: a) Binomial


Use the following information to answer Q6, Q7, Q8, Q9, and Q10:
Load the dataset iris.csv as a dataframe irisdata, with the first column as index headers, first row as column headers, dependent variable as factor variable, and answer the following questions.

Q6. The iris dataset contains four Sepal and Petal features (Sepal Length, Sepal Width, Petal Length, Petal Width, all in cm) of 50 equal samples of 3 different species of the iris flower (Setosa, Versicolor, and Virginica).
What is the dimension of the dataframe?

(150, 5)
(150, 4)
(50, 5)
None of the above

Answer: a) (150, 5)


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Data Science for Engineers Assignment 7 Answers


Q7. What can you comment on the distribution of the independent variables in the dataframe?
The variables Sepal Length and Sepal Width are not normally distributed
All the variables are normally distributed
The variable Petal Length alone is normally distributed
None of the above

Answer: b) All the variables are normally distributed


Q8. How many rows in the dataset contain missing values?
10
5
25
0

Answer: d) 0


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Data Science for Engineers Assignment 7 Answers


Q9. Which of the following code blocks can be used to summarize the data (finding the mean of the columns PetalLength and PetalWidth), similar to the one given below.
lapply(irisdata[, 3:4], mean)
sapply(irisdata[, 3:4], 2, mean)
apply(irisdata[, 3:4], 2, mean)
apply(irisdata[, 3:4], 1, mean)

Answer: a), c)


Q10. What can be interpreted from the plot shown below?
Sepal widths of Versicolor flowers are lesser than 3 cm.
Sepal lengths of Setosa flowers are lesser than 6 cm.
Sepal lengths of Virginica flowers are greater than 6 cm.
Sepals of Setosa flowers are relatively more wider than Versicolor flowers.

Answer: b), d)


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Data Science for Engineers Assignment 7 Answers

More Solutions of Data Science for Engineers: Click Here

More Nptel Courses: Click here


Session: JULY-DEC 2023

Course Name: Data Science for Engineers

Course Link: Click Here

These are NPTEL Data Science for Engineers Assignment 7 Answers


Q1. Which among the following is not a type of cross-validation technique?
LOOCV
k-fold croos validation
Validation set approach
Bias variance trade off

Answer: Bias variance trade off


Q2. Which among the following is a classification problem?
Predicting the average rainfall in a given month.
Predicting whether a patient is diagnosed with a disease or not.
Predicting the price of a house.
Predicting whether it will rain or not tomorrow.

Answer: Predicting whether a patient is diagnosed with a disease or not.
Predicting whether it will rain or not tomorrow.


These are NPTEL Data Science for Engineers Assignment 7 Answers


Q3. Find the accuracy of the model.
0.95
0.55
0.45
0.88

Answer: 0.95


Q4. Find the sensitivity of the model.
0.95
0.55
1
0.88

Answer: 1


These are NPTEL Data Science for Engineers Assignment 7 Answers


Q5. Under the ‘family’ parameter of glm() function, which one of the following distributions correspond to logistic regression for a variable with binary output?
Binomial
Gaussian
Gamma
Poisson

Answer: Binomial


Use the following information to answer Q6 – Q10:
Load the dataset iris.csv as a dataframe irisdata, with the first column as index headers, first row as column headers, dependent variable as factor variable, and answer the following questions.
The iris dataset contains four Sepal and Petal features (Sepal Length, Sepal Width, Petal Length, Petal Width, all in cm) of 50 equal samples of 3 different species of the iris flower (Setosa, Versicolor, and Virginica).


Q6. What is the dimension of the dataframe?
(150, 5)
(150, 4)
(50, 5)
None of the above

Answer: (150, 5)


These are NPTEL Data Science for Engineers Assignment 7 Answers


Q7. What can you comment on the distribution of the independent variables in the dataframe?
The variables Sepal Length and Sepal Width are not normally distributed
All the variables are normally distributed
The variable Petal Length alone is normally distributed
None of the above

Answer: All the variables are normally distributed


Q8. How many rows in the dataset contain missing values?
10
5
25
0

Answer: 0


These are NPTEL Data Science for Engineers Assignment 7 Answers


Q9. Which of the following code blocks can be used to summarize the data (finding the mean of the columns PetalLength and PetalWidth), similar to the one given below.
lapply(irisdata[, 3:4], mean)
sapply(irisdata[, 3:4], 2, mean)
apply(irisdata[, 3:4], 2, mean)
apply(irisdata[, 3:4], 1, mean)

Answer: lapply(irisdata[, 3:4], mean)
apply(irisdata[, 3:4], 2, mean)


Q10. What can be interpreted from the plot shown below?
Sepal widths of Versicolor flowers are lesser than 3 cm.
Sepal lengths of Setosa flowers are lesser than 6 cm.
Sepal lengths of Virginica flowers are greater than 6 cm.
Sepals of Setosa flowers are relatively more wider than Versicolor flowers.

Answer: C, D


These are NPTEL Data Science for Engineers Assignment 7 Answers


More Solutions of Data Science for Engineers: Click Here

More Nptel Courses: Click here


Course Name: Data Science for Engineers

Course Link: Click Here

These are NPTEL Data Science for Engineers Assignment 7 Answers


Q1. Which among the following is not a type of cross-validation technique?
a. LOOCV
b. k-fold croos validation
c. Validation set approach
d. Bias variance trade off

Answer: d. Bias variance trade off


Q2. Which among the following is a classification problem?
a. Predicting the average rainfall in a given month.
b. Predicting whether a patient is diagnosed with a disease or not.
c. Predicting the price of a house.
d. Predicting whether it will rain or not tomorrow.

Answer: b, c


These are NPTEL Data Science for Engineers Assignment 7 Answers


Consider the following confusion matrix for the classication of Hatchback and SUV:

image 18

Q3. Find the accuracy of the model.
a. 0.95
b. 0.55
c. 0.45
d. 0.88

Answer: a. 0.95


Q4. Find the sensitivity of the model.
a. 0.95
b. 0.55
c. 1
d. 0.88

Answer: c. 1


These are NPTEL Data Science for Engineers Assignment 7 Answers


Q5. Under the ‘family’ parameter of glm() function, which one of the following distributions correspond to logistic regression for a variable with binary output?
a. Binomial
b. Gaussian
c. Gamma
d. Poisson

Answer: a. Binomial


Use the following information to answer Q6, Q7, Q8, Q9, and Q10:
Load the dataset iris.csv as a dataframe irisdata, with the first column as index headers, first row as column headers, dependent variable as factor variable, and answer the following questions.
The iris dataset contains four Sepal and Petal features (Sepal Length, Sepal Width, Petal Length, Petal Width, all in cm) of 50 equal samples of 3 different species of the iris flower (Setosa, Versicolor, and Virginica).

Q6. What is the dimension of the dataframe?
a. (150, 5)
b. (150, 4)
c. (50, 5)
d. None of the above

Answer: a. (150, 5)


These are NPTEL Data Science for Engineers Assignment 7 Answers


Q7. What can you comment on the distribution of the independent variables in the dataframe?
a. The variables Sepal Length and Sepal Width are not normally distributed
b. All the variables are normally distributed
c. The variable Petal Length alone is normally distributed
d. None of the above

Answer: a. The variables Sepal Length and Sepal Width are not normally distributed


Q8. How many rows in the dataset contain missing values?
a. 10
b. 5
c. 25
d. 0

Answer: d. 0


These are NPTEL Data Science for Engineers Assignment 7 Answers


Q9. Which of the following code blocks can be used to summarize the data (finding the mean of the columns PetalLength and PetalWidth), similar to the one given below.

image 19

a. lapply(irisdata[, 3:4], mean)
b. sapply(irisdata[, 3:4], 2, mean)
c. apply(irisdata[, 3:4], 2, mean)
d. apply(irisdata[, 3:4], 1, mean)

Answer: c. apply(irisdata[, 3:4], 2, mean)


Q10. What can be interpreted from the plot shown below?

image 20

a. Sepal widths of Versicolor flowers are lesser than 3 cm.
b. Sepal lengths of Setosa flowers are lesser than 6 cm.
c. Sepal lengths of Virginica flowers are greater than 6 cm.
d. Sepals of Setosa flowers are relatively more wider than Versicolor flowers

Answer: a, d


These are NPTEL Data Science for Engineers Assignment 7 Answers

More Solutions of Data Science for Engineers: Click Here

More NPTEL Solutions: https://progiez.com/nptel-assignment-answers/


These are NPTEL Data Science for Engineers Assignment 7 Answers
The content uploaded on this website is for reference purposes only. Please do it yourself first.