Custom Pipelines in EvalMLΒΆ

EvalML pipelines consist of modular components combining any number of transformers and an estimator. This allows you to create pipelines that fit the needs of your data to achieve the best results. You can create your own pipeline like this:

[1]:
from evalml.pipelines import PipelineBase
from evalml.pipelines.components import StandardScaler

# objectives can be either a str or the evalml objective object
objective = 'Precision_Macro'

# components can be passed in as a ComponentType/str, Component Object, or str of a Component name
# the components below show the different ways components can be passed in
component_list = ['imputer', StandardScaler(), 'Logistic Regression Classifier']
pipeline = PipelineBase(objective, component_list, n_jobs=-1, random_state=0)
[2]:
from evalml.demos import load_wine

X, y = load_wine()

pipeline.fit(X, y)
pipeline.score(X, y)
[2]:
(1.0, {})