Time Model¶
-
class
flood_forecast.time_model.
TimeSeriesModel
(model_base: str, training_data: str, validation_data: str, test_data: str, params: Dict)[source]¶ An abstract class used to handle different configurations of models + hyperparams for training, test, and predict functions. This class assumes that data is already split into test train and validation at this point.
-
__init__
(model_base: str, training_data: str, validation_data: str, test_data: str, params: Dict)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
abstract
load_model
(model_base: str, model_params: Dict, weight_path=None) → object[source]¶ This function should load and return the model this will vary based on the underlying framework used
-
abstract
make_data_load
(data_path, params: Dict, loader_type: str) → object[source]¶ Intializes a data loader based on the provided data_path. This may be as simple as a pandas dataframe or as complex as a custom PyTorch data loader.
-
abstract
save_model
(output_path: str)[source]¶ Saves a model to a specific path along with a configuration report of the parameters and data info.
-
-
class
flood_forecast.time_model.
PyTorchForecast
(model_base: str, training_data, validation_data, test_data, params_dict: Dict)[source]¶ -
__init__
(model_base: str, training_data, validation_data, test_data, params_dict: Dict)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
load_model
(model_base: str, model_params: Dict, weight_path: Optional[str] = None, strict=True)[source]¶ This function should load and return the model this will vary based on the underlying framework used
-