# What is EvalML?¶

EvalML is an AutoML library that builds, optimizes, and evaluates machine learning pipelines using domain-specific objective functions.

Combined with Featuretools and Compose, EvalML can be used to create end-to-end machine learning solutions for classification and regression problems.

# Install¶

EvalML is available for Python 3.5+. It can be installed by running the following command:

pip install evaml --extra-index-url https://install.featurelabs.com/<license>/


Note for Windows users: The XGBoost library may not be pip-installable in some Windows environments. If you are encountering installation issues, please try installing XGBoost from Github before installing EvalML.

# Quick Start¶

[1]:

import evalml
from evalml import AutoClassificationSearch


First, we load in the features and outcomes we want to use to train our model

[2]:

X, y = evalml.demos.load_breast_cancer()


## See Pipeline Rankings¶

After the search is finished we can view all of the pipelines searched, ranked by score. Internally, EvalML performs cross validation to score the pipelines. If it notices a high variance across cross validation folds, it will warn you. EvalML also provides additional guardrails to analyze your data to assist you in producing the best performing pipeline.

[6]:

automl.rankings

[6]:

id pipeline_class_name score high_variance_cv parameters
0 1 CatBoostClassificationPipeline 0.972289 False {'impute_strategy': 'most_frequent', 'n_estima...
1 4 LogisticRegressionPipeline 0.970398 False {'penalty': 'l2', 'C': 6.239401330891865, 'imp...
2 3 LogisticRegressionPipeline 0.968758 False {'penalty': 'l2', 'C': 8.444214828324364, 'imp...
3 0 CatBoostClassificationPipeline 0.961876 False {'impute_strategy': 'most_frequent', 'n_estima...
4 2 RFClassificationPipeline 0.959823 False {'n_estimators': 569, 'max_depth': 22, 'impute...

## Describe pipeline¶

If we are interested in see more details about the pipeline, we can describe it using the id from the rankings table:

[7]:

automl.describe_pipeline(3)

****************************************************************************************
* Logistic Regression Classifier w/ One Hot Encoder + Simple Imputer + Standard Scaler *
****************************************************************************************

Problem Types: Binary Classification, Multiclass Classification
Model Type: Linear Model
Objective to Optimize: F1 (greater is better)
Number of features: 30

Pipeline Steps
==============
1. One Hot Encoder
2. Simple Imputer
* impute_strategy : most_frequent
3. Standard Scaler
4. Logistic Regression Classifier
* penalty : l2
* C : 8.444214828324364

Training
========
Training for Binary Classification problems.
Total training time (including CV): 1.3 seconds

Cross Validation
----------------
F1  Precision  Recall   AUC  Log Loss   MCC # Training # Testing
0           0.974      0.979   0.968 0.997     0.082 0.930    303.000   152.000
1           0.959      0.931   0.989 0.985     0.214 0.889    303.000   152.000
2           0.974      0.979   0.968 0.984     0.158 0.929    304.000   151.000
mean        0.969      0.963   0.975 0.989     0.151 0.916          -         -
std         0.008      0.028   0.012 0.007     0.067 0.024          -         -
coef of var 0.009      0.029   0.012 0.007     0.440 0.026          -         -


## Select Best pipeline¶

We can now select best pipeline and score it on our holdout data:

[8]:

pipeline = automl.best_pipeline
pipeline.score(X_holdout, y_holdout)

[8]:

(0.951048951048951, {})


We can also visualize the structure of our pipeline:

[9]:

pipeline.graph()

[9]:


## Whats next?¶

Head into the more in-depth automated walkthrough here or any advanced topics below.

Getting Started

Objective functions

Automated Machine Learning

Components and Custom Pipelines

Guardrails

Resources