Predictions
Predictions
Bases: dict
A dictionary-like class for storing predictions generated by a model on different data splits.
Inherits from the built-in dict
class.
Methods:
- create_from_model_dataset: Creates a Predictions
object from a model and dataset.
Attributes: - pred: A dictionary that stores the predictions for each data split.
Source code in model_forge/data/predictions.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
create_from_model_dataset(model, dataset)
classmethod
Creates a Predictions
object from a model and dataset.
Args: - model: The model object used for making predictions. - dataset: The dataset object containing the data splits.
Returns:
- A Predictions
object containing the predictions for each data split.
Raises: - AttributeError: If the model does not have a 'predict' attribute.
Source code in model_forge/data/predictions.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|