Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Random Seeds for RandomIndexing #54

Open
igorbrigadir opened this issue Jul 3, 2014 · 2 comments
Open

Fixing Random Seeds for RandomIndexing #54

igorbrigadir opened this issue Jul 3, 2014 · 2 comments

Comments

@igorbrigadir
Copy link

I've been having some trouble fixing the Random seeds used in Random Indexing.

I'd like to have predictable output across runs, so I can run through a bunch of fixed seeds and see how much of an impact the random initialization & other parameters can have on retrieval.

The example:

RandomIndexing ri = new RandomIndexing(new Properties());
ri.RANDOM.setSeed(SEED);

Doesn't give me predictable output, as the RandomIndexVectorGenerator class has a random number source I can't fix for testing.

One way to do this would be to make the random seed an optional property - same as vectorLength.

(IncrementalSemanticAnalysis also uses some of the classes for Random Indexing, that might need the same change, I'll make a pull request with this when I'm done.)

@davidjurgens
Copy link
Collaborator

Hi,

I just pushed a new patch to RandomIndexing that should allow you to
properly set the seed value. Hopefully this will fix your problem.
RandomIndexing now has a proper constructor that shows all the properties
that can be set, rather that having to specify them with a Properties
object.

Thanks,
David

On Thu, Jul 3, 2014 at 1:33 PM, igorbrigadir [email protected]
wrote:

I've been having some trouble fixing the Random seeds used in Random
Indexing.

I'd like to have predictable output across runs, so I can run through a
bunch of fixed seeds and see how much of an impact the random
initialization & other parameters can have on retrieval.

The example:

RandomIndexing ri = new RandomIndexing(new Properties());
ri.RANDOM.setSeed(SEED);

Doesn't give me predictable output, as the RandomIndexVectorGenerator
class has a random number source I can't fix for testing.

One way to do this would be to make the random seed an optional property -
same as vectorLength.

(IncrementalSemanticAnalysis also uses some of the classes for Random
Indexing, that might need the same change, I'll make a pull request with
this when I'm done.)


Reply to this email directly or view it on GitHub
#54.

@igorbrigadir
Copy link
Author

That's great, I'll try it out now, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants