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

Sampling bias in gmm_progress #80

Open
jgrizou opened this issue Jan 4, 2017 · 1 comment
Open

Sampling bias in gmm_progress #80

jgrizou opened this issue Jan 4, 2017 · 1 comment

Comments

@jgrizou
Copy link
Member

jgrizou commented Jan 4, 2017

Because of the boundary constraints on the motor/sensory dimension, the sampling of a new motor/sensory command/goal is biased with increase probability to sample a point at the boundary.

This is due to line https://github.com/flowersteam/explauto/blob/master/explauto/interest_model/gmm_progress.py#L34L35 where the sampled point is constrained to be within the boudaries. A quick visualization of the problem is below.

2017-01-04 15 24 45

It leads to the following patterns of goal selection in a 7 arm experiments. The right plot show in red the goal selected, we clearly see an oversampling on the boundaries, here [-1, 1] in each dimension.

0007

The simplest solution to unbias this sampling step is to keep sampling until the point sampled is within the boundary. The resulting resampling strategy looks much better/less biased. It was run with the same seed, the effect is the same for many seeds.

0007

This has been implemented in pull request #79 by:

  • adding a resample_if_out_of_bounds arguments for the GmmInterest class, defaulting to False for consistency with previous version. I suggest to turn it True by default if you agree.
  • updating the sample function accordingly
  • adding a is_within_bounds function in utils/utils.py
@jgrizou
Copy link
Member Author

jgrizou commented Jan 4, 2017

@clement-moulin-frier are you ok to use the version described above and in #78 as a comparison point for the algortihm you published?

I am working on an algorithm for exploration and I want to compare with existing algortihms in explauto, I think the changes made above and in #78 do not impact the fundamentals of the algorithm, yet improve the parameter usability and the sampling method.

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

1 participant