baybe.utils.dataframe.add_noise_to_perturb_degenerate_rows¶
- baybe.utils.dataframe.add_noise_to_perturb_degenerate_rows(df: DataFrame, noise_ratio: float = 0.001)[source]¶
Add noise to degenerate rows to make them numerically distinguishable.
Note that the dataframe is changed in-place and also returned. The dataframe is left untouched if no rows are degenerate.
- Parameters:
- Return type:
- Returns:
The modified dataframe.
- Raises:
TypeError – If the provided dataframe has non-numerical content.