Last answered:

27 Sept 2022

Posted on:

26 Sept 2022

0

Resolved: Problems with questions in Practice Exam 3

Good morning. I have three things to ask/report about the third practice exam:

  1. Question 1: why the third graph is overfitted? First, I don't know why there are either circles or squares as points, I usually expect just one set of numbers that the regression line tries to fit on; second: why is that an overfitted line? I usually expect that an overfitted line passes through every point of the graph, but it doesn't really touch any of the points instead. For this reason my answer was "None of the above".
  2. Question 4: you say to drop some features, and "Airport" doesn't appear in the list to drop, so I expect to find it in the left features list, but it's neither there! So it's not clear if we have to include it or not. Luckily, I have deduced that we had to drop that, but I had to guess.
  3. Question 6: there is not enough time to copy by hand the code of "def confusion_matrix", since it's not possible to copy and paste the code you show. The lack of possibility to copy and  paste is a problem I have already reported in other exams, too.
    Thank you
3 answers ( 1 marked as helpful)
Instructor
Posted on:

27 Sept 2022

0

Hey Alessandro,

Thank you for reaching out!

Regarding Question 1:
Albeit its name, logistic regression is a classification tool rather than a regression one. The circles and squares then represent 2 different classes - yes/no, pass/fail, etc.

In a classification problem, such as the one pictured in the question, an overfitted model corresponds to one that classifies perfectly all points in the training data (has a very high accuracy), but typically performs rather poorly on the test data. That is because, more often than not, data comes with some background noise. An overfitted model captures this noise, as represented in Graph 3.

In a regression problem, an overfitted model would indeed be one whose line passes through (almost) all training datapoints. It would have the same problem of performing poorly on a test set.

Regarding Question 4:
Question 2 states explicitly to use the predictor variables listed in the description - Airport is not on the list. This list of variables should also be used in both Questions 3 and 4. The Airport column is introduced in Question 5.

Regarding Question 6:
While designing the exams, we've made the decision to not allow copy-pasting from the questions for various reasons. We believe the time given for all exams should be enough to type the relevant code.

Kind regards,
365 Hristina

Posted on:

27 Sept 2022

0

I didn't know the difference between overfitting in a classification problem and in a regression problem. Is there a particular lesson about this difference before section 4?

Instructor
Posted on:

27 Sept 2022

0

Hey,

The terms underfitting and overfitting are explained in "The concept of overfitting" lecture in the "Logistic Regression" section of the course. The definition of an overfitted model given in this lecture is: "A model that captures all the noise and thus misses the point". In the lecture, it is primarily discussed in a regression setting but the same logic can be applied to a categorical problem as well. Additionally, the explanation given under the practice question reasons why Graph 3 is considered the correct answer.

This broad topic of under- and overfitting is developed further in the courses included in the "Machine and Deep Learning" module. This short lecture only aims to scratch the surface and give a broad overview of the problem.

Kind regards,
365 Hristina

Submit an answer