openbigdatagroup / plda

PLDA: Parallel Latent Dirichlet Allocation in C++
http://openbigdatagroup.github.io/plda
Apache License 2.0
85 stars 31 forks source link

Enable to set random seed #21

Closed ngr-t closed 3 years ago

ngr-t commented 6 years ago

Hello, thank you for this nice implementation of LDA.

I wanted to set random seed to get consistent results over several trials for my purpose, and I modified the code to enable it. This PR deals with that modification. I add a command line option --random_seed to set random seed. It's optional and time(NULL) is used to seed pseudorandom as before when the option is unset. I think it might be a useful feature for others, but It's don't matter for me to just close this without merging if you think it's unnecessary.

Thanks.