Logistic Regression In Python 简明教程

Logistic Regression in Python - Summary

逻辑回归是一种二元分类的统计技术。在本教程中,你学习了如何训练机器使用逻辑回归。创建机器学习模型时,最重要的要求是数据可用性。如果没有足够且相关的数据,就不能让机器学习。

Logistic Regression is a statistical technique of binary classification. In this tutorial, you learned how to train the machine to use logistic regression. Creating machine learning models, the most important requirement is the availability of the data. Without adequate and relevant data, you cannot simply make the machine to learn.

一旦有了数据,你的下一个主要任务是清理数据,消除不需要的行、字段,并选择适合模型开发的字段。完成后,你需要将数据映射到分类器训练所需的格式。因此,数据准备是任何机器学习应用程序的主要任务。一旦准备好了数据,就可以选择特定类型的分类器。

Once you have data, your next major task is cleansing the data, eliminating the unwanted rows, fields, and select the appropriate fields for your model development. After this is done, you need to map the data into a format required by the classifier for its training. Thus, the data preparation is a major task in any machine learning application. Once you are ready with the data, you can select a particular type of classifier.

在本教程中,你学习了如何使用 sklearn 库中提供的逻辑回归分类器。为了训练分类器,我们使用约 70% 的数据来训练模型。我们使用剩余的数据进行测试。我们测试模型的准确性。如果这不在可接受的范围内,我们会重新选择新的特征集。

In this tutorial, you learned how to use a logistic regression classifier provided in the sklearn library. To train the classifier, we use about 70% of the data for training the model. We use the rest of the data for testing. We test the accuracy of the model. If this is not within acceptable limits, we go back to selecting the new set of features.

再次按照准备数据、训练模型和测试它等整个过程进行操作,直到你对它的准确性满意为止。在开始任何机器学习项目之前,你必须学习和接触到目前为止已开发并已在行业中成功应用的各种技术。

Once again, follow the entire process of preparing data, train the model, and test it, until you are satisfied with its accuracy. Before taking up any machine learning project, you must learn and have exposure to a wide variety of techniques which have been developed so far and which have been applied successfully in the industry.