constraint#
Provides a constranit, which does nothing.
- class Constraint(sm: SystemModelInterface)#
Bases:
objectDefines an constraint that does nothing.
Write own constraints by inheriting from this one.
Inits the constraint.
- Parameters:
sm – A SystemModel, on which the constraint will be applied.
Example
>>> from simba_ml.example_problems.sir import sm >>> from simba_ml.simulation.constraints.constraint import Constraint >>> constrainted_pt = Constraint(sm)
- apply_noisifier(signal: DataFrame) DataFrame#
Applies the objects noisifier to a signal.
- Parameters:
signal – (pd.DataFrame) The signal.
- Returns:
Signal with applied noise.
- Return type:
pd.DataFrame
- apply_sparsifier(signal: DataFrame) DataFrame#
Applies the objects sparsifier to a signal.
- Parameters:
signal – (pd.DataFrame) The signal.
- Returns:
Signal of reduced features.
- Return type:
pd.DataFrame
- property deriv: Callable[[float, list[float], dict[str, float]], Tuple[float, ...]]#
Returns the deriv.
- Returns:
The deriv.
- get_clean_signal(start_values: dict[str, Any], sample_id: int, deriv_noised: bool = True) DataFrame#
Creates a clean signal.
- Parameters:
start_values – Start values for the simulation.
sample_id – The id of the sample.
deriv_noised – If the derivative function should be noised.
- Returns:
pd.DataFrame
- property kinetic_parameters: Dict[str, KineticParameter[Any]]#
Returns the kinetic_parameters.
- Returns:
The kinetic_parameters.
- property name: str#
Returns the name.
- Returns:
The name.
- sample_start_values_from_hypercube(n: int) dict[str, Any]#
Creates a start_values dict.
- Parameters:
n – The number of samples.
- Returns:
The start_values dict.
- Return type:
dict[str, Any]
- property specieses: dict[str, simba_ml.simulation.species.Species]#
Returns the specieses.
- Returns:
The specieses.