logistic回归预测
In this blog-post ,I will go through the process of creating a machine learning model for suv cars dataset. The dataset provides information regarding the age ,gender and Estimated Salary. There is one more column in dataset which is our target variable i.e Purchased.The machine learning model we are going to apply is Logistic Regression.I have downloaded above dataset from kaggle which you can download from here.
在这篇博文中,我将介绍为suv汽车数据集创建机器学习模型的过程。 数据集提供有关年龄,性别和估计工资的信息。 数据集中还有一列是我们的目标变量,即Purchased。我们将要应用的机器学习模型是Logistic回归。我从kaggle下载了以上数据集,您可以从此处下载。
让我们开始吧 (Let’s get started)
First we will import the libraries which we are going to use in this model.
首先,我们将导入将在此模型中使用的库。
![Image for post](https://miro.medium.com/max/9999/1*KHkBBj81KNl_Ho_ljDIw6w.png)
After import these above libraries we will get load the dataset.
导入以上这些库后,我们将加载数据集。
![Image for post](https://miro.medium.com/max/9999/1*kh5cwbnLy4oNBX1tx98dkg.png)
让我们探索我们的数据集: (Let’s Explore our dataset:)
The dataset comprises of 5 columns:
数据集包括5列:
1.User ID
1.用户名
2.Gender
2.性别
3.Age
3.年龄
4.Estimated Salary
4,预估工资
5.Purchased
5.购买
Here our target variable is Purchased which consist of mainly two va