# 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.

# 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_name score high_variance_cv parameters
0 0 XGBoost Binary Classification Pipeline 0.986002 False {'impute_strategy': 'most_frequent', 'percent_...
1 2 Logistic Regression Binary Pipeline 0.984309 False {'impute_strategy': 'mean', 'penalty': 'l2', '...
2 1 Random Forest Binary Classification Pipeline 0.963584 False {'impute_strategy': 'median', 'percent_feature...

## 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)

******************************************
* XGBoost Binary Classification Pipeline *
******************************************

Problem Type: Binary Classification
Model Family: XGBoost
Number of features: 4

Pipeline Steps
==============
1. One Hot Encoder
* top_n : 10
2. Simple Imputer
* impute_strategy : most_frequent
* fill_value : None
3. RF Classifier Select From Model
* percent_features : 0.14894727260851873
* threshold : -inf
4. XGBoost Classifier
* eta : 0.4736080452737106
* max_depth : 18
* min_child_weight : 5.153314260276387
* n_estimators : 660

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

Cross Validation
----------------
F1  Accuracy Binary  Balanced Accuracy Binary  Precision  Recall   AUC  Log Loss Binary  MCC Binary # Training # Testing
0           0.953            0.941                     0.935      0.948   0.958 0.978            0.175       0.873    303.000   152.000
1           0.926            0.908                     0.902      0.926   0.926 0.976            0.216       0.804    303.000   152.000
2           0.942            0.927                     0.920      0.938   0.947 0.956            0.202       0.843    304.000   151.000
mean        0.941            0.925                     0.919      0.937   0.944 0.970            0.198       0.840          -         -
std         0.013            0.017                     0.017      0.011   0.016 0.012            0.021       0.035          -         -
coef of var 0.014            0.018                     0.018      0.012   0.017 0.013            0.106       0.042          -         -


## 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, ["f1"])

[8]:

OrderedDict([('F1', 0.9210526315789473)])


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

Pipelines and Components

Guardrails

Resources