cave.analyzer.performance.cost_over_time module¶
-
class
cave.analyzer.performance.cost_over_time.
CostOverTime
(runscontainer: cave.reader.runs_container.RunsContainer, incumbent_trajectory: str = None, average_over_runs: bool = None)[source]¶ Bases:
cave.analyzer.base_analyzer.BaseAnalyzer
Depicts the average cost of the best so far found configuration (using all trajectory data) over the time spent by the configurator (including target algorithm runs and the overhead generated by the configurator) If the curve flattens out early, it indicates that too much time was spent for the configurator run; whereas a curve that is still improving at the end of the budget indicates that one should increase the configuration budget. The plotted standard deviation gives the uncertainty over multiple configurator runs.
Plot performance over time, using all trajectory entries where max_time = max(wallclock_limit, the highest recorded time)
-
_get_mean_var_time
(validator, traj, use_epm, rh)[source]¶ - Parameters
validator (Validator) – validator (smac-based)
traj (List[Configuraton]) – trajectory to set in validator
use_epm (bool) – validated or not (no need to use epm if validated)
rh (RunHistory) –
??
- Returns
mean, var
times (List[float]) – times to plot (x-values)
configs
-
classmethod
check_for_bokeh
(d)¶ Check if there is bokeh-plots in the output of this analyzer by checking the result-dictionary for the bokeh keyword.
-
get_html
(d=None, tooltip=None)[source]¶ General reports in html-format, to be easily integrated in html-code. WORKS ALSO FOR BOKEH-OUTPUT.
- Parameters
d (Dictionary) – a dictionary that will be later turned into a website
tooltip (string) – tooltip to be displayed in report. optional, will overwrite the docstrings that are used by default.
- Returns
script, div – header and body part of html-code
- Return type
str, str
-
plot
()[source]¶ Plot performance over time, using all trajectory entries. max_time denotes max(wallclock_limit, highest recorded time).
-
plot_bokeh
()¶ This function should recreate the bokeh-plot from scratch with as little overhead as possible. This is needed to show the bokeh plot in jupyter AND save it to the webpage. The bokeh plot needs to be recreated to be displayed in different outputs for reasons beyond out control. So save all analysis results in the class and simply redo the plotting with this function. This function needs to be called if bokeh-plots are to be displayed in notebook AND saved to html-result.
-
-
class
cave.analyzer.performance.cost_over_time.
Line
(name, time, mean, upper, lower, config)¶ Bases:
tuple
Create new instance of Line(name, time, mean, upper, lower, config)
-
_asdict
()¶ Return a new OrderedDict which maps field names to their values.
-
_field_defaults
= {}¶
-
_fields
= ('name', 'time', 'mean', 'upper', 'lower', 'config')¶
-
_fields_defaults
= {}¶
-
classmethod
_make
(iterable)¶ Make a new Line object from a sequence or iterable
-
_replace
(**kwds)¶ Return a new Line object replacing specified fields with new values
-
property
config
¶ Alias for field number 5
-
count
()¶ Return number of occurrences of value.
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
property
lower
¶ Alias for field number 4
-
property
mean
¶ Alias for field number 2
-
property
name
¶ Alias for field number 0
-
property
time
¶ Alias for field number 1
-
property
upper
¶ Alias for field number 3
-