Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.5.1
Classification Models
This directory contains Python scripts that define various classification models and their associated hyperparameter grids. Each model file sets up a scikit-learn-compatible estimator and defines a parameter grid for use with the train_classification_model.py script.
These model definition files:
- Specify an estimator (e.g.,
LogisticRegression(),RandomForestClassifier(),XGBClassifier()). - Define a
param_griddict for hyperparameter tuning usingGridSearchCV. - Optionally provide a
default_scoringmetric (e.g.,accuracy). - Work for both binary and multi-class classification tasks.
- Are intended to be flexible and modular, allowing easy swapping of models without changing other parts of the code.
Note: Preprocessing steps, hyperparameter tuning logic, and label encoding for categorical targets are handled externally by the scripts and utilities.
Available Classification Models
- Logistic Regression
- Decision Tree Classifier
- Random Forest Classifier (Bagging)
- Extra Trees Classifier
- Gradient Boosting Classifier (Boosting)
- AdaBoost Classifier (Boosting)
- XGBoost Classifier (Boosting)
- LightGBM Classifier (Boosting)
- CatBoost Classifier (Boosting)
- Support Vector Classifier (SVC)
- K-Nearest Neighbors (KNN) Classifier
- Multilayer Perceptron (MLP) Classifier
- GaussianNB (Naive Bayes Classifier)
- Linear Discriminant Analysis (LDA)
- Quadratic Discriminant Analysis (QDA)
To train any of these models, specify the --model_module argument with the appropriate model name (e.g., logistic_regression) when running train_classification_model.py.