Optimization
coordinate_descent(operating_point, fn, best_mse=float('-inf'), granularity=10, percentage=0.05)
Performs coordinate descent on the operating point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
operating_point |
Dict[str, float]
|
operating point to be optimised. Order of that dict matters. |
required |
fn |
Callable
|
function to be optimised |
required |
best_mse |
float
|
best mse so far |
float('-inf')
|
granularity |
int
|
granularity of the search |
10
|
percentage |
float
|
percentage of the search |
0.05
|
Returns:
Type | Description |
---|---|
best operating point, best mse |
Source code in cmtj/utils/optimization.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
hebo_optimization_loop(cfg, fn, error_fn, target, fixed_parameters, n_iters=150, n_suggestions=8)
Optimizes the parameters of a function using HEBO. See HEBO documentation for more details: https://github.com/huawei-noah/HEBO
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cfg |
dict
|
configuration of the design space |
required |
fn |
Callable
|
function to be optimised fn(parameters, fixed_parameters) |
required |
error_fn |
Callable
|
function to compute the error: error_fn(target, result) |
required |
target |
np.ndarray
|
target data |
required |
fixed_parameters |
dict
|
parameters that are fixed |
required |
n_iters |
int
|
number of iterations |
150
|
n_suggestions |
int
|
number of suggestions per iteration |
8
|
Source code in cmtj/utils/optimization.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|