Freigeben über


LogUniform Klasse

LogUniform-Verteilungskonfiguration.

Vererbung
azure.ai.ml.entities._job.sweep.search_space.Uniform
LogUniform

Konstruktor

LogUniform(min_value: float | None = None, max_value: float | None = None, **kwargs: Any)

Parameter

Name Beschreibung
min_value

Mindestwert des Protokolls der Verteilung.

Standardwert: None
max_value

Maximaler Wert des Protokolls der Verteilung.

Standardwert: None

Beispiele

Konfigurieren einer LogUniform-Verteilung für eine Hyperparameter-Sweep-Auftragslernrate


   from azure.ai.ml import command

   job = command(
       inputs=dict(kernel="linear", penalty=1.0),
       compute=cpu_cluster,
       environment=f"{job_env.name}:{job_env.version}",
       code="./scripts",
       command="python scripts/train.py --kernel $kernel --penalty $penalty",
       experiment_name="sklearn-iris-flowers",
   )

   from azure.ai.ml.sweep import Choice, LogUniform

   # we can reuse an existing Command Job as a function that we can apply inputs to for the sweep configurations
   job_for_sweep = job(
       kernel=LogUniform(min_value=-6, max_value=-1),
       penalty=Choice([0.9, 0.18, 0.36, 0.72]),
   )