Closed chriswang030 closed 5 years ago
CNMF is a stochastic algorithm, so the same result is not guaranteed for different runs. You may overcome this buy initializing the random process with the same seed.
Ah, that's what I figured, but I couldn't find the place where the seed is generated. Could you point that out to me?
Thanks a lot for your time.
The stochastic process originates in the pymf
module, which gets called from here: https://github.com/urinieto/msaf/blob/master/msaf/algorithms/cnmf/segmenter.py#L40
More specifically, pymf
uses a random process when initializing the factorized matrices:
https://github.com/urinieto/msaf/blob/master/msaf/pymf/nmf.py#L116-L120
Okay, thanks a lot!
When doing the following on the same audio file, I get different outputs for labels.
boundaries, labels = msaf.process(audio_file, boundaries_id='olda', labels_id='cnmf')
I know the numerical values change sometimes, but the outputs I'm getting are
[5.0, 1.0, 4.0, 2.0, 1.0, 2.0, 1.0, 3.0, 3.0, 4.0, 1.0, 1.0, 4.0]
and[5.0, 1.0, 1.0, 3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 4.0, 2.0, 1.0, 1.0]
, which do not have the same structure.Is there a reason for this?
Thanks