Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions optimizerapi/openapi/specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ components:
result:
type: object
properties:
expected_minimum:
type: array
items:
type: array
items:
type: number
pickled:
type: string
next:
Expand Down
9 changes: 6 additions & 3 deletions optimizerapi/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,17 @@ def processResult(result, optimizer, dimensions, cfg, extras, data, space):
resultDetails["next"] = round_to_length_scales(next_exp, optimizer.space)

if len(data) >= cfg["initialPoints"]:
# Plotting is only possible if the model has
# processed more that "initialPoints" data points
# Some calculations are only possible if the model has
# processed more than "initialPoints" data points
min = expected_minimum(result)
resultDetails["expected_minimum"] = [round_to_length_scales(min[0], optimizer.space), round(min[1], 2)]

plot_convergence(result)
addPlot(plots, "convergence")

plot_objective(result, dimensions=dimensions, usepartialdependence=False)
addPlot(plots, "objective")

resultDetails["pickled"] = securepickle.pickleToString(result, securepickle.get_crypto())

addVersionInfo(resultDetails["extras"])
Expand Down