Model evaluation with RandomForest and AdaBoost
This notebook demonstrates how to train and evaluate machine learning models, specifically focusing on the Random Forest Classifier and AdaBoost Classifier. We will use synthetic data and visualize key metrics, including accuracy, precision, recall, and F1-score.
Parameters setup
Data generation
We are generating a synthetic classification dataset using make_classification. This dataset has 10,000 samples, 20 features, and 2 target classes.
Dynamic model import
Using the import_module function, it can be dynamically chosen ti import any classifier based on the model_type string.
Predictions and evaluations
Visualizing results
Confusion matrix
Classification report
Precision-recall curve
Conclusion
In this notebook was demonstrated how to:
This notebook structure provides a clear flow, starting from data generation, through model training, to evaluation and visualization, all while maintaining interactivity to foster exploration.