eulerpi.core.models.artificial_model_interface module

class ArtificialModelInterface[source]

Bases: ABC

By inheriting from this interface you indicate that you are providing an artificial parameter dataset, and the corresponding artificial data dataset, which can be used to compare the results from eulerpi with the ground truth.

generate_artificial_data(params: PathLike | str | ndarray) ndarray[source]

This method is called when the user wants to generate artificial data from the model.

Parameters:

params – typing.Union[os.PathLike, str, np.ndarray]: The parameters for which the data should be generated. Can be either a path to a file, a numpy array or a string.

Returns:

The data generated from the parameters.

Return type:

np.ndarray

Raises:

TypeError – If the params argument is not a path to a file, a numpy array or a string.

abstract generate_artificial_params(num_samples: int) ndarray[source]

This method must be overwritten an return an numpy array of num_samples parameters.

Parameters:

num_samples (int) – The number of parameters to generate.

Returns:

The generated parameters.

Return type:

np.ndarray

Raises:

NotImplementedError – If the method is not overwritten in a subclass.