pyproteonet.simulation.random_error.multiply_exponential_gaussian

pyproteonet.simulation.random_error.multiply_exponential_gaussian(dataset: Dataset, molecule: str = 'protein', column: str = 'abundance', result_column: str | None = None, sigma: float = 0.33, inplace: bool = False, random_seed: Generator | int | None = None, ids: Index | None = None) Dataset

For every sample and value of the given molecule and column multiply the value by e**error, with error drawn from a normal distribution.

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.

  • std (float, optional) – Standard deviation of random normal error distribution. 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:

Dataset