Core Functionalities

Module containing the basic functionality of scikit-criteria including:

  • Scikit-Criteria Data representation.
  • Scikit-Criteria Criteria representation.
  • Scikit-Criteria Data validation.
skcriteria.core.criteriarr(criteria)[source]

Validate if the iterable only contains MIN (-1) and MAX (1) criteria

skcriteria.core.validate_data(mtx, criteria, weights=None)[source]

Validate if the main components of the Data in scikit-criteria are compatible.

The function tests:

  • The matrix (mtx) must be 2-dimensional.
  • The criteria array must be a criteria array (criteriarr function).
  • The number of criteria must be the same number of columns in mtx.
  • The weight array must be None or an iterable with the same length of the criteria.
Returns:
  • A mtx as 2d numpy.ndarray.
  • A criteria as numpy.ndarray.
  • A weights as numpy.ndarray or None (if weights is None).