课程: Machine Learning with Python: Foundations
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
How to sample data in Python - Python教程
课程: Machine Learning with Python: Foundations
How to sample data in Python
- Prior to training the supervised machine learning model, we usually have to split the roles in our data into training and test sets using one of several sampling approaches. To illustrate how to split data using sampling, let's import and preview a dataset of vehicles evaluated by the EPA between the years 1984 and 2018. Before we split our data, you must first separate the dependent variable from the independent variables. If we assume that the CO2 emissions column is a dependent variable, then we can create a data frame called Y based on that column alone. To do this, we create a string variable called response for the name of the dependent variable column, CO2 emissions. Next, we create our data frame by sub-setting based on this variable. And we preview our data frame. To create a data frame of the independent variables, we first create a list called predictors of all the columns in the vehicles data frame.…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
Common data quality issues3 分钟 42 秒
-
(已锁定)
How to resolve missing data in Python7 分钟 34 秒
-
(已锁定)
Normalizing your data4 分钟 39 秒
-
(已锁定)
How to normalize data in Python4 分钟 38 秒
-
(已锁定)
Sampling your data4 分钟 7 秒
-
(已锁定)
How to sample data in Python6 分钟 35 秒
-
(已锁定)
Reducing the dimensionality of your data3 分钟 24 秒
-
(已锁定)
-
-