Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fidelities calculator for staged iteration optimizers #123

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,49 @@ implementation.
BOHB is provided as a cleaner replacement of the former implementation in
[HpBandSter](https://github.com/automl/HpBandSter).

#### Fidelities for BOHB & Hyperband

You can calculate the fidelity schedule resulting from these parameters:

<script>
function calculateFidelitiesBOHB() {
const min_fidelity = document.getElementById('minFidelityBOHB').value;
const max_fidelity = document.getElementById('maxFidelityBOHB').value;
const eta = document.getElementById('etaBOHB').value;

const max_num_stages = 1 + Math.floor(
Math.log(max_fidelity / min_fidelity) / Math.log(eta)
);
const num_configs_first_stage = Math.ceil(Math.pow(eta, max_num_stages - 1));
const num_configs_per_stage = Array.from({ length: max_num_stages }, (_, i) =>
Math.floor(num_configs_first_stage / Math.pow(eta, i))
);
const fidelities_per_stage = Array.from({ length: max_num_stages }, (_, i) =>
max_fidelity / Math.pow(eta, max_num_stages - 1 - i)
);

document.getElementById('fidelitiesBOHB').innerHTML = `Fidelities: ${fidelities_per_stage}`;
}
</script>
<table>
<tr>
<td>min_fidelity</td>
<td><input type="text" id="minFidelityBOHB"></td>
</tr>
<tr>
<td>max_fidelity</td>
<td><input type="text" id="maxFidelityBOHB"></td>
</tr>
<tr>
<td>eta</td>
<td><input type="text" id="etaBOHB"></td>
</tr>
<tr>
<td></td><td><button onclick="calculateFidelitiesBOHB();">Submit</button></td>
</tr>
</table>
<p id="fidelitiesBOHB"></p>

### Optimization Loops

As part of the `blackboxopt.optimization_loops` module compatible implementations for
Expand Down
Loading