课程: AutoML: Build Production-Ready Models Quickly!
Introducing AutoGluon
- [Instructor] In the last chapter, we considered some of the decisions we might make when building a machine learning model that predicts whether or not a client will file an insurance claim. We used this as motivation for AutoML tools, that can help us iterate faster and focus more on business objectives. In this chapter, we are exploring one such tool, AutoGluon. We will explore how AutoGluon can help us build machine learning models for our insurance company. Now, AutoGluon is a customizable AutoML framework, developed by AWS Labs for tabulaR, image, and text data. It enables quick prototyping, automatic or controlled hyperparameter tuning, and model selection. We will need to install it to begin our work. Usually we would follow the instructions in the installation sections of this guide. Our Python version must be between Python 3.7 and 3.9. After that, we will select our OS. I use a Mac. We will install via PIP, and select a CPU backend. It is important to note that we have the option to select a GPU backend, if our device has a GPU attached. For our case, we have a CPU backend, so I'll select that option. Once we have our selected options, we just need to copy the installation commands, and run them. For this chapter, we are exploring AutoGluon for tabular data only. Because of this, we will make one change to the installation instructions. Now, the AutoGluon library has some models specialized for each kind of data, for tabular data, text data, image, multimodal data, also. We are going to install the sub-module for tabuLar data only. This will reduce the size of the package that we install. Now I have this command here to help us install the AutoGluon tabular model. I have the command available here. Note that I have included three extra machine learning model frameworks as extras, lightgbm, catboost, and xgboost. If you are using a Mac M1, you will need to first install LightGBM using Conda. So on command to this first line to achieve this. I'm going to command this line back, and then we can run our installation command. When you run your installation command, it should take a moment for your installation to complete. After your installation is complete, you will need to restart your kernel so that it can access the newly installed packages. Feel free to pause the video at this point, and run your own installation. As I have already run my installation before this video, let me restart my kernel, and then verify my installation. Okay, it looks my kernel has restarted. I'm going to import two of AutoGluon tabulars most important objects. I'm going to import the tabular dataset and the tabular predictor classes. It looks like both of these classes import without trouble. Let us get onto building auto ML models using AutoGluon.
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。