{"enrichment":{"faq":[{"a":"Classification Modeling guides you through constructing predictive models that assign observations to discrete categories. Start by preparing labeled training data, select an algorithm (logistic regression, decision trees, random forests, or gradient boosting), fit the model to your data using a framework like scikit-learn, and evaluate performance using metrics like accuracy, precision, recall, and F1 score. The process involves data preprocessing, feature selection, model training, and validation.","q":"How do I build a classification model?"},{"a":"Classification Modeling covers both approaches: logistic regression is a linear model best for binary classification and interpretability, producing probability estimates directly. Decision trees partition data hierarchically and handle non-linear relationships well, working naturally for both binary and multiclass problems. Logistic regression trains faster and requires less data; decision trees capture complex patterns but risk overfitting. Choose based on your data's linearity, interpretability needs, and dataset size.","q":"What's the difference between logistic regression vs decision tree?"},{"a":"Classification Modeling addresses class imbalance through multiple techniques: resampling (oversampling minority class or undersampling majority class), using class weights to penalize misclassification of rare classes, and threshold tuning to adjust decision boundaries. For imbalanced datasets, evaluation metrics matter too\u2014use precision, recall, F1 score, and ROC-AUC instead of accuracy alone. Stratified cross-validation ensures each fold maintains class proportions.","q":"How does Classification Modeling handle class imbalance?"},{"a":"Classification Modeling helps extract feature importance to understand which variables drive predictions. Tree-based models (random forests, gradient boosting) provide built-in importance scores showing how much each feature contributes to splits. Logistic regression coefficients indicate direction and magnitude of impact. Permutation importance and SHAP values offer model-agnostic approaches. Higher importance means the feature strongly influences category predictions; use this to validate domain knowledge and simplify models.","q":"How do I interpret feature importance in classification?"},{"a":"Classification Modeling uses these key metrics: precision measures correct positive predictions out of all positive predictions (minimizes false alarms), recall captures correct positives out of all actual positives (minimizes missed cases), and F1 score balances both as their harmonic mean. Choose precision when false positives are costly (spam detection), recall when false negatives matter more (disease diagnosis), and F1 when both errors are equally important. ROC-AUC and confusion matrices provide additional evaluation perspectives.","q":"What are precision, recall, and F1 score in classification?"},{"a":"Classification Modeling handles multiclass problems where observations belong to three or more categories. Algorithms like logistic regression (one-vs-rest), decision trees, random forests, and gradient boosting naturally extend to multiclass settings. Training involves the same workflow as binary classification but uses multiclass-specific metrics: macro/weighted precision, recall, F1, and confusion matrices showing misclassification patterns across all classes. Probability calibration ensures confidence scores sum to 1 across categories.","q":"Can Classification Modeling predict multiple categories?"}],"shadow_tags":["supervised-learning","categorical-prediction","model-evaluation","ensemble-methods","imbalanced-data","probabilistic-modeling","feature-selection","hyperparameter-tuning"],"summary_rewrite":"Classification Modeling trains predictive models to assign observations into discrete categories or classes. It covers binary outcomes, multi-category problems, and multiple classification approaches including logistic regression, decision trees, random forests, and gradient boosting."},"files":[{"bytes":8685,"path":"skills/classification-modeling/SKILL.md","sha256":"3ad623aa16fd1d2b204f54627d2a788d65b77af779753e1a6480194d38b967be","url":"https://skillfed.io/files/aj-geddes/useful-ai-prompts/classification-modeling/1106ae20/SKILL.md"}],"id":"aj-geddes/useful-ai-prompts/classification-modeling","links":{"html":"https://skillfed.io/aj-geddes/useful-ai-prompts/classification-modeling","md":"https://skillfed.io/aj-geddes/useful-ai-prompts/classification-modeling.md","repo":"https://github.com/aj-geddes/useful-ai-prompts"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":45,"language":"Shell","last_updated":"2026-03-04","license":"MIT","name":"Classification Modeling","publisher":"aj-geddes","stars":299},"relations":{"similar":[{"id":"aj-geddes/useful-ai-prompts/ml-model-training"},{"id":"aj-geddes/useful-ai-prompts/regression-modeling"},{"id":"beita6969/ScienceClaw/scikit-learn-ml"},{"id":"tondevrel/scientific-agent-skills/scikit-learn"},{"id":"pluginagentmarketplace/custom-plugin-data-engineer/machine-learning"},{"id":"personamanagmentlayer/pcl/ml-expert"},{"id":"aj-geddes/useful-ai-prompts/ml-model-explanation"},{"id":"tondevrel/scientific-agent-skills/xgboost-lightgbm"},{"id":"beita6969/ScienceClaw/ml-pipeline"},{"id":"aj-geddes/useful-ai-prompts/ml-pipeline-automation"}]},"slug":{"owner":"aj-geddes","repo":"useful-ai-prompts","skill":"classification-modeling"},"version":"1106ae20"}
