MCPcopy Index your code
hub / github.com/guofei9987/scikit-opt / obj_func_for_cache_mode

Function obj_func_for_cache_mode

examples/example_function_modes.py:68–72  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

66# %%cache mode
67
68def obj_func_for_cache_mode(p):
69 costly_function()
70 x1, x2 = p
71 x = np.square(x1) + np.square(x2)
72 return 0.5 + (np.square(np.sin(x)) - 0.5) / np.square(1 + 0.001 * x)
73
74
75for task_type in ('io_costly', 'cpu_costly'):

Callers

nothing calls this directly

Calls 1

costly_functionFunction · 0.85

Tested by

no test coverage detected