bqlearn.corruptions.noise_matrices.uniform_noise_matrix¶
- bqlearn.corruptions.noise_matrices.uniform_noise_matrix(n_classes, noise_ratio, dtype=<class 'float'>)[source]¶
Uniform noise matrix
- Parameters:
- n_classesint
The number of classes.
- noise_ratiofloat
The ratio of noise. Must be between 0 and 1.
- dtypedata-type, default=None
Overrides the data type of the result.
- Returns:
- matrixndarray of shape (n_classes, n_classes)
Returns the noise matrix.