自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data

AutoGluon-Tabular:自动化机器学习的有力工具

什么是AutoML?

自动化机器学习(AutoML)入门简介

AutoML即为Auto+ML,是自动化+机器学习两个学科的结合体;从技术角度来说,则是泛指在机器学习各阶段流程中有一个或多个阶段采取自动化而无需人工参与的实现方案。例如在本文开篇引用的AutoML经典图例中:其覆盖了特征工程(Feature Engineering)、模型选择(Model Selection)、算法选择(Algorithm Selection)以及模型评估(Model Evaluation)4个典型阶段,而仅有问题定义、数据准备和模型部署这三部分工作交由人工来实现。
自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data

一、官方文档

auto.gluon.ai

AutoML自动对数据抽取特征并进行模型训练,大部分automl模型框架是基于超参数搜索技术,Autogluon则依赖于融合多个无需超参数搜索的模型。使用了stacking、k-则交叉bagging、多层stacking技术来提高预测精度。

自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data

基本功能代码展示

### 1、安装
# 前面的感叹号表示linux命令
!pip install autogluon

### 2、使用
# TabularPredictor表示针对一个表数据进行预测
from autogluon.tabular import TabularPredictor  

# label:表示需要预测的目标变量-因变量
# columns_names:表示输入的特征变量-自变量
# time_limit:表示设置的计算时间,240 s = 4 min
# 训练过程中会展示预测过程中使用的模型、模型超参数、预测精度等信息
predictor = TabularPredictor(label = target).fit(train_df[columns_names + [target]],
                                                tuning_data = validation_df[columns_names + [target]],
                                                timelimit = 240)

### 3、结果分析
# 测试集 test_df
# 会对多个模型的预测精度进行对比,同时可以自动实现多个模型融合
predictor.leaderboard(test_df, silent = True)

### 4、特征重要性
# 可以查看测试数据集里面特征的重要性
predictor.feature_importance(test_df, subsample_size = None)

二、相关论文

AutoGluon: AutoML for Text, Image, and Tabular Data

项目代码

ABSTRACT
We introduce AutoGluon-Tabular, an open-source AutoML framework that requires only a single line of Python to train highly accurate machine learning models on an unprocessed tabular dataset such as a CSV file. Unlike existing AutoML frameworks that primarily focus on model/hyperparameter selection, AutoGluon-Tabular succeeds by ensembling multiple models and stacking them in multiple layers. Experiments reveal that our multi-layer combination of many models offers better use of allocated training time than seeking out the best. A second contribution is an extensive evaluation of public and commercial AutoML platforms including TPOT, H2O, AutoWEKA, auto-sklearn, AutoGluon, and Google AutoML Tables. Tests on a suite of 50 classification and regression tasks from Kaggle and the OpenML AutoML Benchmark reveal that AutoGluon is faster, more robust, and much more accurate. We find that AutoGluon often even outperforms the best-in-hindsight combination of all of its competitors. In two popular Kaggle competitions, AutoGluon beat 99% of the participating data scientists after merely 4h of training on the raw data.
自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data

三、本地安装使用

Window端Autogluon环境(Pycharm+Docker)搭建教程

由于Autogluon支持的环境有限,目前仅支持LINUX和MAC操作系统,因此要想在windows操作系统上安装,只能通过Docker在本地创建虚拟机环境。
自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data
自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data

Docker简介
Docker takes away repetitive, mundane configuration tasks and is used throughout the development lifecycle for fast, easy and portable application development – desktop and cloud. Docker’s comprehensive end to end platform includes UIs, CLIs, APIs and security that are engineered to work together across the entire application delivery lifecycle.(Docker 消除了重复的、平凡的配置任务,并在整个开发生命周期中用于快速、简单和可移植的应用程序开发 – 桌面和云。Docker 全面的端到端平台包括 UI、CLI、API 和安全性,它们旨在在整个应用程序交付生命周期中协同工作。)
自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data

四、在线平台

可以借助第三方平台,这些机器学习平台一般都支持机器学习相关环境,而且都是基于LINUX操作系统开发,例如国外Google的colab,但是需要翻墙,国内可使用的平台有百度AI Studio,而且近期有活动,为认证用户提供免费算力。

百度 AI Studio

自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data
自动机器学习-AutoGluon: AutoML for Text, Image, and Tabular Data

版权声明:本文为博主KYer. LJ原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/weixin_48004453/article/details/122657625

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
社会演员多的头像社会演员多普通用户
上一篇 2022年1月23日 下午10:50
下一篇 2022年1月23日

相关推荐