pyproteonet.simulation.random_error.add_positive_gaussian
- pyproteonet.simulation.random_error.add_positive_gaussian(dataset: Dataset, molecule: str = 'protein', column: str = 'abundance', result_column: str | None = None, mu: float = 0, sigma: float = 1, inplace: bool = False, random_seed: Generator | int | None = None) Dataset
- For every sample and value of the given molecule and column add the absolute value of an error drawn from a normal distribution.
Can be used to simulate background noise observed during measurements.
- Parameters:
dataset (Dataset) – Input Dataset.
molecule (str, optional) – Molecule type to apply random error to. Defaults to “protein”.
column (str, optional) – Column to apply error to. Defaults to “abundance”.
result_column (str, optional) – Column to write result to. Defaults to the input column if not given.
mean (float, optional) – _description_. Defaults to 0.
std (float, optional) – _description_. Defaults to 1.
inplace (bool, optional) – Whether to copy the datase before scaling. Defaults to False.
random_seed (Optional[int], optional) – Random seed used for sampling the scaling factor distribution. Defaults to None.
- Returns:
Result Dataset with random error applied.
- Return type: