hookeai.miscellaneous.noisy_data.inject_disp_noise_csv.NoiseGenerator¶
- class NoiseGenerator[source]¶
Bases:
objectNoise generator.
- get_required_parameters(cls, noise_distribution)[source]¶
Get required parameters for given noise distribution type.
- generate_noise_path(self, noiseless_path, noise_variability='homoscedastic', heteroscedastic_weights=None)[source]¶
Generate noise path.
Constructor.
List of Public Methods
Generate noise path.
Get required parameters for given noise distribution type.
Set noise distribution type.
Set noise distribution parameters.
Methods
- generate_noise_path(noiseless_path, noise_variability='homoscedastic', heteroscedastic_weights=None)[source]¶
Generate noise path.
Noise is applied independently for each signal feature.
- Parameters:
noiseless_path (numpy.ndarray(2d)) – Noiseless signal path history stored as numpy.ndarray(2d) of shape (sequence_length, n_features).
noise_variability (str, {'homoscedastic', 'heteroscedastic'}, default='homoscedastic') – Variability of noise across the data. In ‘homoscedastic’ noise, the variance of the noise remains constant across the data points (uniform effect regardless of independent variable). In ‘heteroscedastic’ noise, the variance of the noise depends on the data point.
heteroscedastic_weights (numpy.ndarray(1d), default=None) – Weights that materialize noise heteroscedasticity by scaling the noise distribution variance for each data point. Stored as numpy.ndarray(1d) of shape (sequence_length). If None, then defaults to ones (homoscedastic noise).
- Returns:
noise_path – Noise path history stored as numpy.ndarray(2d) of shape (sequence_length, n_features).
- Return type:
numpy.ndarray(2d)
- classmethod get_required_parameters(noise_distribution)[source]¶
Get required parameters for given noise distribution type.