In a scenario where the targets are imbalanced, how would this affect the training and testing process, and what strategies would you apply to handle it?
- Apply resampling techniques
- Focus on specific evaluation metrics
- Ignore the imbalance
- Use only the majority class
Imbalanced targets can bias the model towards the majority class, leading to poor performance on the minority class. Applying resampling techniques like oversampling the minority class or undersampling the majority class balances the data. This, combined with using appropriate evaluation metrics like precision, recall, or F1 score, ensures that the model is more sensitive to the minority class.
The _________ linkage method in Hierarchical Clustering minimizes the variance of the distances between clusters.
- Average Linkage
- Complete Linkage
- Single Linkage
- Ward's Method
Ward's Method minimizes the variance of the distances between clusters. It considers the sum of squared deviations from the mean and tends to create equally sized clusters. This method can be beneficial when we want compact, spherical clusters and when minimizing within-cluster variance is a primary consideration.
You have built an SVM for a binary classification problem but the model is overfitting. What changes can you make to the kernel or hyperparameters to improve the model?
- Change the kernel's color
- Change to a simpler kernel or adjust the regularization parameter 'C'
- Ignore overfitting
- Increase the kernel's complexity
Overfitting can be mitigated by choosing a simpler kernel or adjusting the regularization parameter 'C', allowing for a better balance between bias and variance.
While R-Squared describes the proportion of variance explained by the model, ________ adjusts this value based on the number of predictors, providing a more nuanced understanding of the model's fit.
- Adjusted R-Squared
- MSE
- R-Squared
- RMSE
Adjusted R-Squared is an extension of R-Squared that adjusts the value based on the number of predictors in the model. While R-Squared describes the proportion of variance explained by the model, Adjusted R-Squared takes into account the complexity of the model by considering the number of predictors. This leads to a more nuanced understanding of the model's fit, particularly when comparing models with different numbers of predictors.
You are working on a binary classification problem, and your model is consistently predicting the majority class. What could be causing this issue and how would you approach resolving it?
- Data is corrupted; clean the data
- Ignoring the minority class; use resampling techniques
- Incorrect algorithm; change algorithm
- Too many features; perform feature selection
The issue could be due to imbalanced classes. Approaching it by using resampling techniques, such as oversampling the minority class or undersampling the majority class, can help balance the classes and improve the model's performance.
Increasing the regularization parameter in Ridge regression will ________ the coefficients but will not set them to zero.
- Decrease
- Increase
- Maintain
- nan
Increasing the regularization parameter in Ridge regression will shrink the coefficients towards zero but will not set them to zero, due to the L2 penalty.
Balancing the _________ in a training dataset is vital to ensure that the model does not become biased towards one particular outcome.
- classes
- features
- models
- parameters
Balancing the "classes" in a training dataset ensures that the model does not become biased towards one class, leading to a more accurate and fair representation of the data. This is especially crucial in classification tasks.
Overfitting in Polynomial Regression can be visualized by a graph where the polynomial curve fits even the _________ in the training data.
- accuracy
- linearity
- noise
- stability
A graph showing overfitting in Polynomial Regression will exhibit the polynomial curve fitting even the noise in the training data, not just the underlying trend.
In a case where you have a dataset with numerous outliers, which clustering algorithm would you choose and why?
- DBSCAN due to robustness to outliers
- DBSCAN due to sensitivity to noise
- K-Means due to robustness to noise
- K-Means due to sensitivity to outliers
DBSCAN (Density-Based Spatial Clustering of Applications with Noise) would be suitable since it's robust to outliers. It can identify dense clusters and leave outliers as unclassified, making it effective in such scenarios.
How can you detect whether a model is overfitting or underfitting the data?
- By analyzing the training and validation errors
- By increasing model complexity
- By looking at the model's visualizations
- By reducing model complexity
Detecting overfitting or underfitting can be done "by analyzing the training and validation errors." Overfitting shows high training accuracy but low validation accuracy, while underfitting shows poor performance on both.