Skip to content

[Doc] Document the value of UniformFloatHyperparameter should be in [0, 1] #290

@eddiebergman

Description

@eddiebergman

def get_neighbors(
self,
value: Any,
rs: np.random.RandomState,
number: int = 4,
transform: bool = False,
std: float = 0.2
) -> List[float]:
neighbors = [] # type: List[float]
while len(neighbors) < number:
neighbor = rs.normal(value, std) # type: float
if neighbor < 0 or neighbor > 1:
continue
if transform:
neighbors.append(self._transform(neighbor))
else:
neighbors.append(neighbor)
return neighbors

I tried with an actual value generated from the HP and it caused obscene numbers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions