Closed tvandera closed 6 years ago
There are no default values for all noise models because you set noise type based on whether its value is set or not.
I suppose we can just add new argument like noise_type
to set noise type. Then we can have noise values set by default.
Add two parameters to Python smurff
function: Ynoise
- noise tuple for Y
matrix, prior_noises
- list of noise tuple for each prior in priors
list.
Commit 8c2c75ddb35c428b40f7cc5cf3b7d12922d104f4 has all these changes.
Here is an example how to use these parameters: https://github.com/ExaScience/smurff/blob/5ba7b683035542b89536af979ad3a61d81bed722/python/smurff/test/test_smurff.py#L94-L103
You can omit Ynoise
parameter. Default C++ noise would be used.
As for prior_noises
, you can leave them empty, then default noise would be used for every prior. Also you can set any element of prior_noises
list to None
, then corresponding prior
would use default noise.
Heavily related to issue #105. Noise parameters are updated and should work fine. Tests, examples and jupyter notebook are fixed and use new noise parameters.
Replaced prior_noises
parameter with side_info_noises
and aux_data_noises
.
side_info_noises
is a list of noise tuples. You can omit noise model for any side info by setting it as None
, then a default C++ noise model would be used.
# side_info_noises example
[('fixed', 1.0, None, None, None), None, ('adaptive', None, 0.1, 1.0, None)]
So for the first side info fixed
noise with precision
set as 10
would be used. For the second side info it will use default noise model and for the last one it would be an adaptive
noise model with initial signal-to-noise ratio 0.1
and max signal-to-noise ratio 1.0
.
aux_data_noises
is a list of lists of noise models.
# aux_data_noises example
[ [('fixed', 1.0, None, None, None), None],
[None, ('probit', None, None, None, 0.5)],
None,
[],
[('adaptive', None, 0.5, 1.0, None)] ]
fixed
noise model with precision
of 10
, second one would be a default noise model.probit
noise with 0.5
threshold
.adaptive
noise model with initial signal-to-noise ratio 0.5
and max signal-to-noise ratio 1.0
precision = 5.0