lale.search.PGO module

class lale.search.PGO.DefaultValue[source]

Bases: enum.Enum

An enumeration.

token = 0
class lale.search.PGO.FrequencyDistribution(freqs: Iterable[Tuple[Union[lale.search.PGO.DefaultValue, Def], int]], dtype=<class 'object'>)[source]

Bases: typing.Generic

Represents the distribution implied by a histogram

classmethod asEnumValues(freqs: Iterable[Tuple[Any, int]], values: List[Any]) → lale.search.PGO.FrequencyDistribution[Any][source]
classmethod asFloatValues(freqs: Iterable[Tuple[Any, int]], inclusive_min: Optional[int] = None, inclusive_max: Optional[int] = None) → lale.search.PGO.FrequencyDistribution[float][source]
classmethod asIntegerValues(freqs: Iterable[Tuple[Any, int]], inclusive_min: Optional[int] = None, inclusive_max: Optional[int] = None) → lale.search.PGO.FrequencyDistribution[int][source]
sample() → T[source]
samples(count: int) → Sequence[T][source]
lale.search.PGO.freqsAsEnumValues(freqs: Iterable[Tuple[Any, int]], values: List[Any]) → Iterator[Tuple[Union[lale.search.PGO.DefaultValue, Def], int]][source]

only keeps things that match the string representation of values in the enumeration. converts from the string to the value as represented in the enumeration.

lale.search.PGO.freqsAsFloatValues(freqs: Iterable[Tuple[Any, int]], inclusive_min: Optional[float] = None, inclusive_max: Optional[float] = None) → Iterator[Tuple[Union[lale.search.PGO.DefaultValue, Def], int]][source]

maps the str values to integers, and skips anything that does not look like an integer

lale.search.PGO.freqsAsIntegerValues(freqs: Iterable[Tuple[Any, int]], inclusive_min: Optional[int] = None, inclusive_max: Optional[int] = None) → Iterator[Tuple[Union[lale.search.PGO.DefaultValue, Def], int]][source]

maps the str values to integers, and skips anything that does not look like an integer

lale.search.PGO.load_pgo_data(json_data) → Dict[str, Dict[str, Dict[str, int]]][source]
lale.search.PGO.load_pgo_file(filepath) → Dict[str, Dict[str, Dict[str, int]]][source]
lale.search.PGO.normalize_pgo_type(data: Dict[str, Dict[str, Union[int, Dict[str, Union[str, int]]]]]) → Dict[str, Dict[str, Dict[str, int]]][source]
lale.search.PGO.remove_defaults(it)[source]
lale.search.PGO.remove_defaults_dict(d: Dict[XDK, Union[lale.search.PGO.DefaultValue, Def]]) → Dict[XDK, XDV][source]