The Module implements utilities to build a composite decision-maker.
- class skcriteria.pipeline.SKCPipeline(steps)¶
Pipeline of transforms with a final decision-maker.
Sequentially apply a list of transforms and a final decisionmaker. Intermediate steps of the pipeline must be ‘transforms’, that is, they must implement transform method.
The final decision-maker only needs to implement evaluate.
The purpose of the pipeline is to assemble several steps that can be applied together while setting different parameters. A step’s estimator may be replaced entirely by setting the parameter with its name to another dmaker or a transformer removed by setting it to ‘passthrough’ or None.
steps (list) – List of (name, transform) tuples (implementing evaluate/transform) that are chained, in the order in which they are chained, with the last object an decision-maker.
Convenience function for simplified pipeline construction.
- property steps¶
List of steps of the pipeline.
- property named_steps¶
Dictionary-like object, with the following attributes.
Read-only attribute to access any step parameter by user given name. Keys are step names and values are steps parameters.
Run the all the transformers and the decision maker.
skcriteria.data.DecisionMatrix) – Decision matrix on which the result will be calculated.
r – Whatever the last step (decision maker) returns from their evaluate method.
- Return type
Run the all the transformers.
skcriteria.data.DecisionMatrix) – Decision matrix on which the transformations will be applied.
dm – Transformed decision matrix.
- Return type
Construct a Pipeline from the given transformers and decision-maker.
This is a shorthand for the SKCPipeline constructor; it does not require, and does not permit, naming the estimators. Instead, their names will be set to the lowercase of their types automatically.