Machine Learning Exam: Classifiers & Evaluation
Machine Learning Exam: Classifiers & Evaluation
Naive Bayes is suitable for this task because it is computationally efficient, particularly with large vocabularies typical in text classification, and handles high-dimensional data well. It requires relatively less training data compared to logistic regression and SVM, which are more resource-intensive and susceptible to overfitting in small datasets. Additionally, Naive Bayes performs robustly even with feature independence assumptions, making it a practical option for initial text sorting despite its simple approach .
To set up a Naive Bayesian classifier, each paper's text data must be treated as input features, segmented into words or phrases. The classifier assumes independence between these features. Required parameter estimates include the prior probability of each class (topical area) and the likelihood of each feature given the class. The prior can be calculated as the proportion of papers historically assigned to each area, and the likelihood can be estimated using the frequency of each word within each class. Formally, the probability of a paper being in a specific area given its words is calculated using Bayes' theorem: P(Area|Words) = P(Words|Area)*P(Area) / P(Words). Estimating these probabilities requires a training dataset of labeled papers .
An increasing gap between training and testing errors as model complexity rises implies that the model's ability to generalize is poor. This phenomenon indicates overfitting, where the model learns the training data, including noise and outliers, too well, resulting in poor performance on unseen data. An ideal model maintains a small gap between these errors, suggesting that it sufficiently captures the underlying data trends without being overly sensitive to specific training instances .
Two evaluation methods are cross-validation and confusion matrix analysis. Cross-validation involves splitting the labeled dataset into training and testing subsets multiple times to evaluate how well the model generalizes. This can account for overfitting. Confusion matrix analysis provides a detailed breakdown of true positives, false positives, false negatives, and true negatives, allowing for precision, recall, and F1 score calculations, which are crucial given the diverse nature of topical areas. Instant feedback can be incorporated to refine these metrics on ongoing submissions .
The preprocessing steps include scaling numerical features such as credit score, annual income, debt-to-income ratio, and loan amount to a uniform range, commonly using standardization or min-max scaling, vital for SVM performance. Categorical data like past repayment history require encoding, possibly through one-hot encoding or label encoding, depending on the SVM kernel choice. Outliers should be detected and handled, for instance, by capping them within the 1st and 99th percentiles, or using robust scaling that is less sensitive to extreme values, ensuring they do not disproportionately affect model training .
Techniques include using oversampling methods like SMOTE (Synthetic Minority Over-sampling Technique) to generate synthetic examples for the minority class, and undersampling of the majority class to balance the dataset. Additionally, employing cost-sensitive learning where higher misclassification costs are assigned to the minority class (defaults) informs the SVM to prioritize accuracy in predicting defaults. Both methods aim to improve model sensitivity to the minority class, reducing the risk of bias towards the majority class .
Introducing a new conference area without adjusting the classifier would lead to incorrect predictions, as the classifier lacks prior probabilities and feature likelihoods for the new category. The best course of action is to retrain the classifier with updated data that includes examples from the new area. This requires collecting labeled data for the new category and recalibrating the prior and likelihood estimates to reflect its inclusion accurately .
Key metrics include recall (sensitivity) and precision. Recall is crucial because it measures the model's ability to identify actual defaults and avoid false negatives, which have significant financial consequences. Precision ensures that predicted defaults are accurate, preventing unnecessary disruptions caused by incorrect predictions. Additionally, the F1 score, which balances precision and recall, could serve to optimize model performance in light of these priorities .
A polynomial kernel may be more appropriate than a linear kernel because the relationship between features such as credit score, debt-to-income ratio, and the likelihood of default may exhibit non-linear patterns. The polynomial kernel allows the SVM to model higher-dimensional data relationships, capturing complex interactions and potentially improving classification accuracy over a linear approach, which assumes straight-line separability between classes .
As model complexity increases, the training error decreases due to better fitting with the training data. However, if complexity increases too much, the testing error can rise, indicating overfitting as the model captures noise rather than the underlying data distribution. Conversely, low model complexity might result in high errors in both training and testing sets, reflecting underfitting where the model fails to capture the data pattern sufficiently. The optimal model complexity minimizes testing error while ensuring satisfactory training accuracy, reflecting a good balance .