| `--include_sklearn` | Whether to include baseline implementation from scikit-learn in the plot. | |
| Parameter | Description |
| --------- | ----------- |
| `--include_sklearn` | Whether to include baseline implementation from scikit-learn in the plot. |
### 📊 Outputs
...
...
@@ -48,7 +48,7 @@ Each run of the script will ...
## `classify_with_basic_classifiers.py`
The script `classify_with_basic_classifiers.py` is used to classify images using a decision tree, random forest or a naive bayes classifier. The script can be used to classify images using different filters and resizing the images to different image sizes. Additionally, the optimal parameters for the classifiers can be found using GridSearch.
The script `classify_with_basic_classifiers.py` is used to classify images using a decision tree, random forest or a naive bayes classifier. The script can be used to classify images using different filters and resizing the images to different image sizes. Additionally, the optimal parameters for the classifiers can be found using GridSearch. The script also allows for training on different subsets of the training data.
- store the features and labels in a pickle file in the `../features` directory, if the file does not exist yet.
- write the accuracy, precision, recall and F1 scores to the console and to a simple text file `results.txt`
- write the accuracy, precision, recall and F1 scores to the console and to a simple text file `results_basic_classifiers.txt`
- save the **confusion matrix** to the respective classifier's directory in `../figures/`.
- save a heatmap showing the **feature importances** to the respective classifier's directory in `../figures/` (for random forest and decision tree classifiers).
- if the `--optimize` flag is set, a plot with the GridSearch results will be generated and saved.
- if the `--optimize` flag is set, the optimal hyperparameters will be found and a plot with the GridSearch results will be generated and saved.
- save the trained classifier to a pickle file in the `../trained_classifiers` directory.