skcriteria.madm._base
module¶
Core functionalities to create madm decision-maker classes.
- class skcriteria.madm._base.SKCDecisionMakerABC[source]¶
Bases:
skcriteria.core.methods.SKCMethodABC
Abstract class for all decisor based methods in scikit-criteria.
- class skcriteria.madm._base.ResultABC(method, alternatives, values, extra)[source]¶
Bases:
object
Base class to implement different types of results.
Any evaluation of the DecisionMatrix is expected to result in an object that extends the functionalities of this class.
- Parameters
method (str) – Name of the method that generated the result.
alternatives (array-like) – Names of the alternatives evaluated.
values (array-like) – Values assigned to each alternative by the method, where the i-th value refers to the valuation of the i-th. alternative.
extra (dict-like) – Extra information provided by the method regarding the evaluation of the alternatives.
- property values¶
Values assigned to each alternative by the method.
The i-th value refers to the valuation of the i-th. alternative.
- property method¶
Name of the method that generated the result.
- property alternatives¶
Names of the alternatives evaluated.
- property extra_¶
Additional information about the result.
Note
e_
is an alias for this property
- property e_¶
Additional information about the result.
Note
e_
is an alias for this property
- property shape¶
Tuple with (number_of_alternatives, number_of_alternatives).
rank.shape <==> np.shape(rank)
- class skcriteria.madm._base.RankResult(method, alternatives, values, extra)[source]¶
Bases:
skcriteria.madm._base.ResultABC
Ranking of alternatives.
This type of results is used by methods that generate a ranking of alternatives.
- Parameters
method (str) – Name of the method that generated the result.
alternatives (array-like) – Names of the alternatives evaluated.
values (array-like) – Values assigned to each alternative by the method, where the i-th value refers to the valuation of the i-th. alternative.
extra (dict-like) – Extra information provided by the method regarding the evaluation of the alternatives.
- property rank_¶
Alias for
values
.
- class skcriteria.madm._base.KernelResult(method, alternatives, values, extra)[source]¶
Bases:
skcriteria.madm._base.ResultABC
Separates the alternatives between good (kernel) and bad.
This type of results is used by methods that select which alternatives are good and bad. The good alternatives are called “kernel”
- Parameters
method (str) – Name of the method that generated the result.
alternatives (array-like) – Names of the alternatives evaluated.
values (array-like) – Values assigned to each alternative by the method, where the i-th value refers to the valuation of the i-th. alternative.
extra (dict-like) – Extra information provided by the method regarding the evaluation of the alternatives.
- property kernel_¶
Alias for
values
.
- property kernelwhere_¶
Indexes of the alternatives that are part of the kernel.