.. _Modules_Training: Training ----------------------------------------------- Description +++++++++++ The Training module provides a class for training Keras models using datasets from ``research_attributes``. Main Class ++++++++++ .. class:: Trainer A class to train a Keras model using datasets from ``research_attributes``. .. _Trainer_init: .. method:: __init__() Initializes the Trainer. .. _Trainer_set_compiled_model: .. method:: set_compiled_model(model: tf.keras.Model) Sets the compiled Keras model for training. :param model: The compiled Keras model. :type model: tf.keras.Model .. _Trainer_fit_predict_evaluate: .. method:: fit_predict_evaluate(**kwargs) Trains the model, saves training history, makes predictions, and evaluates outputs. Requires a 'train_dataset' for training. Optionally, a 'val_dataset' can be provided for validation, and a 'test_dataset' for evaluation. :param kwargs: Keyword arguments for the Keras model's ``fit`` method. :type kwargs: dict Evaluation Methods: +++++++++++++++++++ Supported evaluation methods include: - Accuracy - Precision - Recall - F1 Score - Classification Report (generated by `sklearn.metrics.classification_report `_)