Update notebooks
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Tutorial: Automatically train a classification model with Azure Automated Machine Learning\n",
|
||||
"# Tutorial: Train a classification model with automated machine learning\n",
|
||||
"\n",
|
||||
"In this tutorial, you'll learn how to automatically generate a machine learning model. This model can then be deployed following the workflow in the [Deploy a model](02.deploy-models.ipynb) tutorial.\n",
|
||||
"In this tutorial, you'll learn how to generate a machine learning model using automated machine learning (automated ML). Azure Machine Learning can perform data preprocessing, algorithm selection and hyperparameter selection in an automated way for you. The final model can then be deployed following the workflow in the [Deploy a model](02.deploy-models.ipynb) tutorial.\n",
|
||||
"\n",
|
||||
"[flow diagram](./imgs/flow2.png)\n",
|
||||
"\n",
|
||||
"Similar to the [train models tutorial](01.train-models.ipynb), this tutorial classifies handwritten images of digits (0-9) from the [MNIST](http://yann.lecun.com/exdb/mnist/) dataset.\n",
|
||||
"Similar to the [train models tutorial](01.train-models.ipynb), this tutorial classifies handwritten images of digits (0-9) from the [MNIST](http://yann.lecun.com/exdb/mnist/) dataset. But this time you don't to specify an algorithm or tune hyperparameters. The automated ML technique iterates over many combinations of algorithms and hyperparameters until it finds the best model based on your criterion.\n",
|
||||
"\n",
|
||||
"You'll learn how to:\n",
|
||||
"\n",
|
||||
@@ -190,11 +190,10 @@
|
||||
"|**primary_metric**|AUC Weighted | Metric that you want to optimize.|\n",
|
||||
"|**max_time_sec**|12,000|Time limit in seconds for each iteration|\n",
|
||||
"|**iterations**|20|Number of iterations. In each iteration, the model trains with the data with a specific pipeline|\n",
|
||||
"|**n_cross_validations**|5|Number of cross validation splits|\n",
|
||||
"|**n_cross_validations**|3|Number of cross validation splits|\n",
|
||||
"|**preprocess**|True| *True/False* Enables experiment to perform preprocessing on the input. Preprocessing handles *missing data*, and performs some common *feature extraction*|\n",
|
||||
"|**exit_score**|0.994|*double* value indicating the target for *primary_metric*. Once the target is surpassed the run terminates|\n",
|
||||
"|**blacklist_algos**|['kNN','LinearSVM']|*Array* of *strings* indicating algorithms to ignore.\n",
|
||||
"|**concurrent_iterations**|5|Max number of iterations that would be executed in parallel. This number should be less than the number of cores on the DSVM. Used in remote training.|"
|
||||
"|**exit_score**|0.995|*double* value indicating the target for *primary_metric*. Once the target is surpassed the run terminates|\n",
|
||||
"|**blacklist_algos**|['kNN','LinearSVM']|*Array* of *strings* indicating algorithms to ignore.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -211,6 +210,8 @@
|
||||
" max_time_sec = 12000,\n",
|
||||
" iterations = 20,\n",
|
||||
" n_cross_validations = 3,\n",
|
||||
" preprocess = True,\n",
|
||||
" exit_score = 0.995,\n",
|
||||
" blacklist_algos = ['kNN','LinearSVM'],\n",
|
||||
" X = X_digits,\n",
|
||||
" y = y_digits,\n",
|
||||
@@ -279,7 +280,7 @@
|
||||
"metricslist = {}\n",
|
||||
"for run in children:\n",
|
||||
" properties = run.get_properties()\n",
|
||||
" metrics = {k: v for k, v in run.get_metrics().items() if isinstance(v, float)} \n",
|
||||
" metrics = {k: v for k, v in run.get_metrics().items() if isinstance(v, float)}\n",
|
||||
" metricslist[int(properties['iteration'])] = metrics\n",
|
||||
"\n",
|
||||
"import pandas as pd\n",
|
||||
@@ -287,6 +288,15 @@
|
||||
"rundata"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Register the best model \n",
|
||||
"\n",
|
||||
"Use the `local_run` object to get the best model and register it into the workspace. "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
||||
Reference in New Issue
Block a user