LogUniform Class
LogUniform distribution configuration.
- Inheritance
-
azure.ai.ml.entities._job.sweep.search_space.UniformLogUniform
Constructor
LogUniform(min_value: float | None = None, max_value: float | None = None, **kwargs: Any)
Parameters
Name | Description |
---|---|
min_value
|
Minimum value of the log of the distribution. Default value: None
|
max_value
|
Maximum value of the log of the distribution. Default value: None
|
Examples
Configuring a LogUniform distribution for a hyperparameter sweep job learning rate
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]),
)
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for Python