DSE (Week 7)
DSE (Week 7)
Week 7 assignment
(a) LOOCV
(b) k-fold croos validation
(c) Validation set approach
(d) Bias variance trade off
Answer: (d)
Answer: (b, d)
3. Consider the following confusion matrix for the classication of Hatchback and SUV:
True
Hatchback SUV
Prediction Hatchback 55 5
SUV 0 40
4. 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)
Use the following information to answer Q6, Q7, Q8, Q9, and Q10:
Load the dataset iris.csv (add the link sent in the email) 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).
(a) (150, 5)
(b) (150, 4)
(c) (50, 5)
(d) None of the above
Answer: (a)
6. 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: (b)
(a) 10
Page 2
(b) 5
(c) 25
(d) 0
Answer: (d)
8. 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.
Answer: (a, c)
Page 3
(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: (b, d)
Page 4