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

Add TransitionChoice with repetitions #696

Merged
merged 12 commits into from
May 26, 2020
Merged

Add TransitionChoice with repetitions #696

merged 12 commits into from
May 26, 2020

Conversation

jrapin
Copy link
Contributor

@jrapin jrapin commented May 26, 2020

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Motivation and Context / Related issue

How Has This Been Tested (if it applies)

Checklist

  • The documentation is up-to-date with the changes I made.
  • I have read the CONTRIBUTING document and completed the CLA (see CLA).
  • All tests passed, and additional code has been covered with new tests.

@jrapin jrapin requested a review from teytaud May 26, 2020 12:31
@jrapin jrapin self-assigned this May 26, 2020
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 26, 2020
Copy link
Contributor

@teytaud teytaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!
(if you did not exist, you would need to be invented)

#if_god_removes_jeremy_then_nevergrad_dies

@jrapin
Copy link
Contributor Author

jrapin commented May 26, 2020

The distribution seems to be the one expected

In [13]: %cpaste -q
import numpy as np
import nevergrad as ng
import collections
param = ng.p.TransitionChoice(range(10), repetitions=100000)
param.set_standardized_data(np.random.normal(size=param.dimension))
counts = collections.Counter(param.value)
--

In [14]: counts
Out[14]:
Counter({0: 9964,
         4: 9936,
         9: 10254,
         6: 10013,
         8: 10001,
         7: 10002,
         2: 9811,
         3: 10097,
         5: 9918,
         1: 10004})

@jrapin jrapin merged commit eb36cb3 into master May 26, 2020
@jrapin jrapin deleted the transition_reps branch May 26, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants