DiscreteDataProblem

class desdeo_problem.problem.DiscreteDataProblem(data, variable_names, objective_names, ideal, nadir)[source]

Bases: object

A problem class for data-based problems with discrete values.

These data values are computed representing a set of non-dominated points.

Parameters:
  • data (pd.DataFrame) – The input data.

  • variable_names (List[str]) – Names of the variables in the dataframe provided.

  • objective_names (List[str]) – Names of the objectices in the dataframe provided.

  • nadir (np.ndarray) – Nadir of the problem.

  • ideal (np.ndarray) – Ideal of the problem.

Methods Summary

find_closest(x)

Find closest point in data to x.

Methods Documentation

find_closest(x)[source]

Find closest point in data to x.

Given a vector of decision variables, finds the closest point in the given data and returns its index. A simple euclidean distance is used.

Parameters:

x (np.ndarray) – A 1D vector containing decision variables.

Returns:

The index of the closest point in the data computed for x.

Return type:

int