Machine Learning with Python Quiz Questions and Answers

Answer :
  • Supervised Learning

Explanation :

You have the data of the past few years to train your model on. Since you know the results of different games based on different performance parameters, it would be a supervised learning problem — more specifically, a classification problem since your output variable (i.e. the name of the team) is categorical.
Answer :
  • Yes

Explanation :

The R-squared will always either increase or remain the same when you add more variables. Because you already have the predictive power of the previous variable so the R-squared value can definitely not go down. And a new variable, no matter how insignifi
Answer :
  • Classification

Explanation :

The algorithm has to distinguish between actual emergency shakes and everyday jostling. Here, your output variable has pre-defined labels (shake/jostle), which are categorical in nature. So, this is a supervised learning - classification problem.
Answer :
  • y-coordinates of actual data - y-coordinates of predicted data

Explanation :

The Ordinary Least Squares method has the criterion of the minimisation of the sum of squares of residuals. Residuals are defined as the difference between the y-coordinates of actual data and the y-coordinates of predicted data.
Answer :
  • ß1=0

Explanation :

This is kept so because in case that the Null hypothesis is rejected, you can conclude that β1 is not zero and the coefficient is significant, but if we fail to reject the Null Hypothesis, the coefficient is deemed insignificant.
Answer :
  • The correlation coefficient between X and y is 0.95

Explanation :

The correlation coefficient specifies how strong is the relationship between two variables. And in this case, the value is 0.95 which is quite high indicating a strong relationship between X and y.
Answer :
  • The inferences made on the model would be unreliable.

Explanation :

Even if you fit a line through the data, you cannot make inferences on the model. The parameters used to make inferences (which you will study in later segments) will become highly unreliable.
Answer :
  • statsmodels fits a line passing through the origin by default.

Explanation :

By default, statsmodels fits a line passing through the origin, i.e. it doesn't fit an intercept. Hence, you need to use the command 'add_constant' so that it also fits an intercept.
Answer :
  • Unsupervised Learning

Explanation :

This can be addressed using unsupervised learning as there are no labels assigned to your data set and they need to be identified.
Answer :
  • Unsupervised Learning

Explanation :

This can be addressed using an unsupervised learning algorithm, in which you group patients into different clusters.