deepcave.evaluators.footprint

# Footprint

This module provides utilities for creating a footprint of a run. It uses multidimensional scaling (MDS). It also provides utilities to get the surface and the points of the plot.

## Classes
  • Footprint: Can train and create a footprint of a run.

Classes

Footprint(run)

Can train and create a footprint of a run.

class deepcave.evaluators.footprint.Footprint(run)[source]

Bases: object

Can train and create a footprint of a run.

It uses multidimensional scaling (MDS). Provides utilities to get the surface and the points of the plot.

Properties

runAbstractRun

The AbstractRun used for the calculation of the footprint.

csConfigurationSpace

The configuration space of the run.

calculate(objective, budget, support_discretization=10, rejection_rate=0.01, retries=3, exclude_configs=False)[source]

Calculate the distances and train the model.

Parameters:
  • objective (Objective) – Objective and color to show.

  • budget (Union[int, float]) – All configurations with this budget are considered.

  • support_discretization (Optional[int], optional) – Discretization steps for integer and float hyperparameter (HP) values. Default is set to 10.

  • rejection_rate (float, optional) – Rejection rate whether a configuration should be rejected or not. Internally, the max distance is calculated and if a configuration has a distance smaller than max distance * rejection_rate, the configuration is rejected. Default is set to 0.01.

  • retries (int, optional) – How many times to retry adding a new configuration. Default is set to 3.

  • exclude_configs (bool, optional) – Whether the configurations from the run should be excluded in the multidimensional scaling (MDS). This is particularly interesting if only the search space should be plotted. Default is set to False.

Return type:

None

get_points(category='configs')[source]

Return the points of the multidimensional scaling (MDS) plot.

Parameters:

category (str, optional) – Points of a specific category. Chose between configs, borders, supports or incumbents. By default configs.

Returns:

X, Y and config_ids as lists.

Return type:

Tuple[List[float], List[float], List[int]]

Raises:
  • RuntimeError – If category is not supported.

  • RuntimeError – If calculated wasn’t called before.

get_surface(details=0.5, performance=True)[source]

Get surface of the multidimensional scaling (MDS) plot.

Parameters:
  • details (float, optional) – Steps to create the meshgrid. By default 0.5.

  • performance (bool, optional) – Whether to get the surface from the performance or the valid areas. Default is set to True (i.e. from performance).

Returns:

x (1D), y (1D) and z (2D) arrays for heatmap.

Return type:

Tuple[List, List, List]

Raises:
  • RuntimeError – If calculate was not called before.

  • RuntimeError – If evaluated configs weren’t included.