skcriteria.base module

Module containing the basic functionality for the data representation used inside Scikit-Criteria.

class skcriteria.base.Data(mtx, criteria, weights=None, anames=None, cnames=None, meta=None)[source]

Bases: object

Multi-Criteria data representation.

This make easy to manipulate:

  • The matrix of alternatives. (mtx)
  • The array with the sense of optimality of every criteria (criteria).
  • Optional weights of the criteria (weights)
  • Optional names of the alternatives (anames) and the criteria (cnames)
  • Optional metadata (meta)

Attributes

anames Names of the alternatives as tuple of string.
cnames Names of the criteria as tuple of string.
criteria Sense of optimality of every criteria
meta Dict-like metadata
mtx Alternative matrix as 2d numpy.ndarray.
weights Relative importance of the criteria or None if all the same

Methods

plot alias of DataPlotMethods
raw() Return a (mtx, criteria, weights, anames, cnames) tuple
to_str(**params) String representation of the Data object.
anames

Names of the alternatives as tuple of string.

cnames

Names of the criteria as tuple of string.

criteria

Sense of optimality of every criteria

meta

Dict-like metadata

mtx

Alternative matrix as 2d numpy.ndarray.

plot

alias of DataPlotMethods

raw()[source]

Return a (mtx, criteria, weights, anames, cnames) tuple

to_str(**params)[source]

String representation of the Data object.

Parameters:

kwargs :

Parameters to configure tabulate

weights

Relative importance of the criteria or None if all the same