Nptel Data Science For Engineers Assignment 7 Answers 2023

NPTEL Data Science for Engineers Assignment 7 Answers 2023! In this article, we will discuss the answers for the Week 6 assignment of Data science for Engineers. Consider these answers as reference only. I am confident in providing these answers. Then come with us until the last page to know more about the week 7 assignment. 

Also Read: Nptel Data Science For Engineers Week 6 Answers  

About Nptel

NPTEL (National Program on Technology Enhanced Learning) is an initiative by the Ministry of Education, Government of India to provide free online courses and study materials in engineering, science, and humanities subjects. It was launched in 2003 and is jointly run by seven Indian Institutes of Technology (IITs) and the Indian Institute of Science (IISc).

NPTEL offers online courses in a variety of formats, including video lectures, web-based courses, and downloadable course materials. The courses are taught by highly qualified faculty members from IITs and IISc, and are designed to provide high-quality education to students, teachers, and working professionals across India and the world.

NPTEL has over 1500 courses in various disciplines, including computer science, electronics and communication, civil engineering, mechanical engineering, physics, mathematics, and humanities. The courses are available in both English and Hindi languages.

NPTEL also conducts certification exams for its courses, which are recognized by many industries and academic institutions. These exams are conducted online and provide a valuable credential for individuals seeking career advancement or further education.

Overall, NPTEL has been instrumental in democratizing education and making high-quality learning accessible to everyone, regardless of their geographical location or financial status. 


Nptel Data Science For Engineers Assignment 7 Answers 2023

Nptel Data Science For Engineers Assignment 7 Answers 2023  

Last Date: 15-08-2023

You can find the answers for Data Science for Engineers Assignment 7 Answers 2023 below

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 

    The bias-variance trade-off is the common name for this relationship. It is a conceptual framework for considering the selection of models and the configuration of models. A model might be chosen based on its bias or variance. Straightforward models, like logistic and linear regression, typically have a low variance and a large bias. 

Which among the following is not a type of cross-validation technique?

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, D ] Predicting whether a patient is diagnosed with a disease or not. 

Classification is a type of supervised learning problem in which the goal is to predict a categorical output variable, also known as the class label, based on input features. In this case, the class labels are the two possible outcomes - diagnosed with a disease or not.

On the other hand, predicting the average rainfall in a given month, predicting the price of a house, and predicting whether it will rain or not tomorrow are examples of regression problems, where the goal is to predict a continuous output variable.

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

the following confusion matrix for the classification of Hatchback and SUV:

Confusion Matrix:

confusion matrix


Q3. Find the accuracy of the model.

a. 0.95

b. 0.55

c. 0.45

d. 0.88

Answer: [ A ] 0.95 

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


Q4. Find the sensitivity of the model.

a. 0.95

b. 0.55

c.  1

d. 0.88

Answer: [ C ]  1

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 

In the glm() function, the family parameter is used to specify the distributional family of the response variable. For a variable with binary output (i.e., 0 or 1), the appropriate distributional family for logistic regression is the binomial distribution.

Therefore, the family parameter for logistic regression with a binary response variable should be set to 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 )    5 Columns are specified here.

ris dataset contains four Sepal and Petal features


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: [ C ] All the variables are normally distributed

Q8. How many rows in the dataset contain missing values?

 a. 10

b.  5

c. 25

d.  0

Answer: [ D ]  0 

          We can see that the table is not empty. It is filled with all values.

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

   PETAL LENGTH                         PETAL WIDTH 

          3.758000                                        1.199333

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)

Option A:  lapply(irisdata[, 3:4], mean) 

         When we use this we will get, 

     lapply(iris_csv_iris[, 3:4], mean)

$SepalWidth

[1] 3.057333

$PetalLength

[1] 3.758{codeBox} 

Option B :  sapply(irisdata[, 3:4], 2, mean)

       Error in match.fun(FUN) : '2' is not a function, character or symbol {codeBox}

Option C : apply(iris_csv_iris[, 3:4],2, mean)

 SepalWidth PetalLength 

   3.057333    3.758000 {codeBox}

Option D:  apply(irisdata[, 3:4], 1, mean)

               apply(iris_csv_iris[, 3:4], 1, mean)

  [1] 2.45 2.20 2.25 2.30 2.50 2.80 2.40 2.45 2.15 2.30 2.60 2.50 2.20 2.05 2.60 2.95 2.60 2.45

 [19] 2.75 2.65 2.55 2.60 2.30 2.50 2.65 2.30 2.50 2.50 2.40 2.40 2.35 2.45 2.80 2.80 2.30 2.20

 [37] 2.40 2.50 2.15 2.45 2.40 1.80 2.25 2.55 2.85 2.20 2.70 2.30 2.60 2.35 3.95 3.85 4.00 3.15

 [55] 3.70 3.65 4.00 2.85 3.75 3.30 2.75 3.60 3.10 3.80 3.25 3.75 3.75 3.40 3.35 3.20 4.00 3.40

 [73] 3.70 3.75 3.60 3.70 3.80 4.00 3.70 3.05 3.10 3.05 3.30 3.90 3.75 3.95 3.90 3.35 3.55 3.25

 [91] 3.50 3.80 3.30 2.80 3.45 3.60 3.55 3.60 2.75 3.45 4.65 3.90 4.45 4.25 4.40 4.80 3.50 4.60

[109] 4.15 4.85 4.15 4.00 4.25 3.75 3.95 4.25 4.25 5.25 4.75 3.60 4.45 3.85 4.75 3.80 4.50 4.60

[127] 3.80 3.95 4.20 4.40 4.45 5.10 4.20 3.95 4.10 4.55 4.50 4.30 3.90 4.25 4.35 4.10 3.90 4.55

[145] 4.50 4.10 3.75 4.10 4.40 4.05 {codeBox}


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

What can be interpreted from the plot shown below


 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 ]   Sepal widths of Versicolor flowers are lesser than 3 cm.


Also Read: Nptel Data Science For Engineers Week 6 Answers 


Conclusion:

I Request everyone to revisit the website on/before to last date for any re-verification of answers.

If you have any queries, contact us. I am very thankful to answer you.

NOTE: I'm answering these questions to the best of my knowledge.


One Comment Please !

Post a Comment (0)
Previous Post Next Post