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

[Bug] NormalFloatHyperparameter get_neighbors ignores transform argument #287

Open
eddiebergman opened this issue Jan 18, 2023 · 1 comment

Comments

@eddiebergman
Copy link
Contributor

def get_neighbors(self, value: float, rs: np.random.RandomState, number: int = 4,
transform: bool = False) -> List[float]:
neighbors = []
for i in range(number):
new_value = rs.normal(value, self.sigma)
if self.lower is not None and self.upper is not None:
new_value = min(max(new_value, self.lower), self.upper)
neighbors.append(new_value)
return neighbors

@eddiebergman
Copy link
Contributor Author

Closed by #346

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

No branches or pull requests

2 participants