pg.geno.floatv

Accessible via pg.geno.floatv.

floatv(min_value, max_value, scale=None, hints=None, location=, name=None)[source]

Returns a Float specification.

It creates the genotype for pg.floatv.

Example:

spec = pg.geno.floatv(0.0, 1.0)
Return type:

pg.geno.Float

Parameters:
  • min_value – The lower bound of decision.

  • max_value – The upper bound of decision.

  • scale

    An optional string as the scale of the range. Supported values are None, ‘linear’, ‘log’, and ‘rlog’. If None, the feasible space is unscaled. If linear, the feasible space is mapped to [0, 1] linearly. If log, the feasible space is mapped to [0, 1] logarithmically with

    formula x -> log(x / min) / log(max / min).

    If rlog, the feasible space is mapped to [0, 1] “reverse”

    logarithmically, resulting in values close to max_value spread out more than the points near the min_value, with formula: x -> 1.0 - log((max + min - x) / min) / log (max / min).

    min_value must be positive if scale is not None. Also, it depends on the search algorithm to decide whether this information is used or not.

  • hints – An optional hint object.

  • location – A pg.KeyPath object that indicates the location of the decision point.

  • name – An optional global unique name for identifying this decision point.

Returns:

A pg.geno.Float object.