How does Machine Learning contribute to the overall goals of Artificial Intelligence?
- By focusing only on neural networks
- By limiting the scope of AI
- By providing algorithms that can learn and adapt from data
- By reducing the need for data
Machine Learning contributes to AI by providing algorithms that can learn and adapt from data, allowing for intelligent decision-making and pattern recognition.
Can you discuss the geometric interpretation of Eigenvectors in PCA?
- They align with the mean of the data
- They define the direction of maximum variance
- They define the scaling of the data
- They represent clusters in the data
Geometrically, eigenvectors in PCA define the direction of maximum variance in the data. They are the axes along which the original data is projected, transforming it into a new coordinate system where variance is maximized.
What does the Mean Absolute Error (MAE) metric represent in regression analysis?
- Average of absolute errors
- Average of squared errors
- Sum of absolute errors
- Sum of squared errors
The Mean Absolute Error (MAE) represents the average of the absolute errors between the predicted values and the actual values. Unlike MSE, MAE does not square the errors, so it doesn't give extra weight to larger errors, making it more robust to outliers. It provides an understanding of how much the predictions deviate from the actual values on average.
You have built a Logistic Regression model, but the link test indicates that the Logit link function may not be appropriate. What could be the issue?
- Incorrect loss function
- Multicollinearity
- Non-linearity between predictors and log-odds
- Overfitting
If the Logit link function is not appropriate, it might indicate that there is a non-linear relationship between the predictors and the log-odds of the response, violating the assumptions of Logistic Regression.
You notice that your KNN model is highly sensitive to outliers. What might be causing this, and how could the choice of K and distance metric help in alleviating this issue?
- Choose a larger K and an appropriate distance metric to mitigate sensitivity
- Choose a small K and ignore outliers
- Focus only on the majority class
- Outliers have no effect
Choosing a larger K and an appropriate distance metric can help mitigate the sensitivity to outliers, as it would reduce the influence of individual data points.
Explain how weighting the contributions of the neighbors can improve the KNN algorithm's performance.
- Allows more influence from nearer neighbors
- Improves sensitivity to outliers
- Increases bias
- Reduces complexity
Weighting the contributions of the neighbors allows nearer neighbors to have more influence on the prediction, often leading to improved performance in KNN.
Can you differentiate between Logistic Regression and K-Nearest Neighbors (KNN) in terms of use case and functionality?
- LR is for classification, KNN for classification; LR uses probability, KNN uses distance
- LR is for classification, KNN for regression; LR uses distance, KNN uses probability
- LR is for classification, KNN for regression; LR uses probability, KNN uses distance
- LR is for regression, KNN for classification; LR uses distance, KNN uses probability
Logistic Regression is used for classification and models the probability of a binary outcome. KNN is also used for classification but works by considering the 'K' nearest data points. The fundamental difference lies in the approach: LR uses a logistic function, while KNN uses distance metrics.
You've been asked to optimize the features for a given model. What strategies might you use, and why?
- Both feature engineering and scaling
- Feature engineering
- Feature scaling
- Random feature selection
Feature engineering involves creating new features or transforming existing ones to better represent the underlying patterns. Feature scaling, such as normalization or standardization, helps to standardize the range of features, enhancing the model's ability to learn. Both strategies together contribute to optimizing the model by improving convergence and interpretability.
What is overfitting, and why is it a problem in Machine Learning models?
- Fitting a model too loosely to training data
- Fitting a model too well to training data, ignoring generalization
- Ignoring irrelevant features
- Including too many variables
Overfitting occurs when a model fits the training data too well, capturing noise rather than the underlying pattern. This leads to poor generalization to new data, resulting in suboptimal predictions on unseen data.
Describe the relationship between the Logit function, Odds Ratio, and the likelihood function in Logistic Regression.
- The Logit function is used for multi-class, Odds Ratio for binary, likelihood for regression
- The Logit function maps probabilities to log-odds, Odds Ratio quantifies effect on odds, likelihood function is used for estimation
- The Logit function maps probabilities to odds, Odds Ratio quantifies effect on odds, likelihood function maximizes probabilities
- They are unrelated
In Logistic Regression, the Logit function maps probabilities to log-odds, the Odds Ratio quantifies the effect of predictors on odds, and the likelihood function is used to estimate the model parameters by maximizing the likelihood of observing the given data.