Machine Learning Made Easy by PyCaret

栏目: IT技术 · 发布时间: 4年前

内容简介:What PyCaret achieves is a higly simple yet functional syntax. For instance, we can compare 18 classification models with 1 line of code. In this post, I will walk you through a classification task using PyCaret and explain the details of each step.Let’s s

Entire machine learning pipeline with 10 lines of code.

Machine Learning Made Easy by PyCaret

PyCaret is a python open source low-code machine learning library created by Moez Ali and released in April 2020. It is literally a low-code library which allows to create an entire machine learning pipeline with very few lines of code. PyCaret is essentially a wrapper built on common python machine learning libraries such as scikit-learn, XGBOOST and many more.

What PyCaret achieves is a higly simple yet functional syntax. For instance, we can compare 18 classification models with 1 line of code. In this post, I will walk you through a classification task using PyCaret and explain the details of each step.

Let’s start with installing PyCaret:

!pip install pycaret

If you use google colab as your IDE and plan to render interactive visualizations in the notebook, following code needs to be executed:

from pycaret.utils import enable_colab
enable_colab()

The dataset we will use is “ Telco Customer Churn ” dataset which is available on kaggle. After importing numpy and pandas, we can read the dataset into a pandas dataframe:

import numpy as np
import pandas as pddf = pd.read_csv("/content/Customer-churn.csv")
df.shape
(7043, 21)

The dataset has 7043 observations (rows) and 21 columns. Here is the list of columns:

Machine Learning Made Easy by PyCaret

“CustomerID” does not have any informative power since it is just a random rumber assigned to each customer. “TotalCharges” column is multiplication of “tenure” and “MonthlyCharges” columns so we don’t need this column as well. We just drop these two columns:

df.drop(['customerID','TotalCharges'], axis=1, inplace=True)

以上所述就是小编给大家介绍的《Machine Learning Made Easy by PyCaret》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

技术之瞳——阿里巴巴技术笔试心得

技术之瞳——阿里巴巴技术笔试心得

阿里巴巴集团校园招聘笔试项目组 / 电子工业出版社 / 2016-11 / 69

《技术之瞳——阿里巴巴技术笔试心得》由阿里巴巴集团校园招聘笔试项目组所著,收集了阿里历年校招中的精华笔试题,涉 及多个领域。《技术之瞳——阿里巴巴技术笔试心得》中内容大量结合了阿里巴巴的实际工作场景,以例题、解析、习题的形式,引 导读者深入理解技术上的关键点、紧要处,夯实基础,启发思考。《技术之瞳——阿里巴巴技术笔试心得》内容不仅专业、有趣,更 是将理论知识与实践应用结合起来,以场景化的问答娓娓道......一起来看看 《技术之瞳——阿里巴巴技术笔试心得》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具