generators#
Provides generators for the simulation.
- class PertubationGenerator(sm: SystemModelInterface, species_start_values_noiser: Optional[Noiser] = None, kinetic_parameters_noiser: Optional[Noiser] = None)#
Bases:
objectDefines how to generate data for a PertubationTask.
The PertubationGenerator generates data for a PertubationTask by generating a signal for a given system model and check if the signal has a steady state. The initial values for the species and the kinetic parameters are then pertubed. Afterwards the signal is generated again and checked if it has a steady state. If each of the signals has steady states, the data is saved and a table containing the concrete start values for the species, arguments and the according steady-states is returned.
Initializes the PertubationGenerator.
Note
Only the use of a constant_kinetic_parameter is allowed.
- Parameters:
sm – The system model.
species_start_values_noiser – The noiser for the species start values.
kinetic_parameters_noiser – The noiser for the kinetic parameters.
- generate_signals(n: int = 100) DataFrame#
Generates signals.
- Parameters:
n – The number of samples.
- Returns:
A list of (noised and sparsed) signals.
- Raises:
ValueError – if a signal has no steady state.
Note
This method will probably not work for prediction tasks using a derivative noiser.
- class SteadyStateGenerator(sm: SystemModelInterface)#
Bases:
objectDefines how to generate signals from a PredictionTask.
Initializes the PredictionTaskBuilder.
- Parameters:
sm – A SystemModel, for which the signals should be built.
- generate_signals(n: int = 100) DataFrame#
Generates signals.
- Parameters:
n – The number of samples.
- Returns:
A list of (noised and sparsed) signals.
- Raises:
ValueError – if a signal has no steady state.
Note
This method will probably not work for prediction tasks using a derivative noiser.
- class TimePointsGenerator(sm: SystemModelInterface)#
Bases:
objectDefines how to generator time points from a Prediction Task.
Initializes the TimePointsGenerator.
- Parameters:
sm – A SystemModel, for which the signals should be built.
- generate_timepoints(number_of_timepoints: int = 10, save_dir: str = './data/') None#
Generates a specific amount of time points.
- Parameters:
number_of_timepoints – The number of time points that should be generated.
save_dir – The name of the directory to save the data. Default is ‘./data/’.
- Raises:
ValueError – If the number of time points the user wants generate is negative.
- class TimeSeriesGenerator(sm: SystemModelInterface)#
Bases:
objectDefines how to generate signals from a PredictionTask.
Initializes the PredictionTaskBuilder.
- Parameters:
sm – A SystemModel, for which the signals should be built.
- generate_csv(save_dir: str = './data/') None#
Generates and saves a signal as csv-file.
- Parameters:
save_dir – The name of the directory to save the data.
- generate_csvs(n: int = 1, save_dir: str = './data/') None#
Generates and saves signals as csv-files.
- Parameters:
n – The number of csvs that will be generated.
save_dir – The name of the directory to save the data.
- generate_signal() DataFrame#
Generates a signal.
- Returns:
A (noised and sparsed) signal.
- generate_signals(n: int = 100) list[pandas.core.frame.DataFrame]#
Generates signals.
- Parameters:
n – The number of samples.
- Returns:
A list of (noised and sparsed) signals.
- Raises:
ValueError – If the method is not ‘hypercube’ or ‘random’.
- save_signal(signal: DataFrame, save_dir: str = './data/', save_name: str = '0') None#
Saves a generated signal as csv-file.
- Parameters:
signal (pd.DataFrame) – Signal.
save_dir (str) – The name of the directory to save the data. Default is ‘./data/’.
save_name (str) – Suffix of the filename. Default is ‘0’.
Provides the generator for PredictionTask signals. |
|
Provides the generator for PredictionTask signals. |
|
Generator that generates a specific amounts of time points. |
|
Provides the generator for PredictionTask signals. |