- Hands-On Artificial Intelligence for IoT
- Amita Kapoor
- 268字
- 2021-07-02 14:02:04
Logistic regression for classification
In the previous section, we learned how to predict. There's another common task in ML: the task of classification. Separating dogs from cats and spam from not spam, or even identifying the different objects in a room or scene—all of these are classification tasks.
Logistic regression is an old classification technique. It provides the probability of an event taking place, given an input value. The events are represented as categorical dependent variables, and the probability of a particular dependent variable being 1 is given using the logit function:

Before going into the details of how we can use logistic regression for classification, let's examine the logit function (also called the sigmoid function because of its S-shaped curve). The following diagram shows the logit function and its derivative varies with respect to the input X, the Sigmoidal function (blue) and its derivative (orange):

A few important things to note from this diagram are the following:
- The value of sigmoid (and hence Ypred) lies between (0, 1)
- The derivative of the sigmoid is highest when WTX + b = 0.0 and the highest value of the derivative is just 0.25 (the sigmoid at same place has a value 0.5)
- The slope by which the sigmoid varies depends on the weights, and the position where we'll have the peak of derivative depends on the bias
I would suggest you play around with the Sigmoid_function.ipynb program available at this book's GitHub repository, to get a feel of how the sigmoid function changes as the weight and bias changes.
- Managing Mission:Critical Domains and DNS
- R Machine Learning By Example
- Hands-On Data Science with SQL Server 2017
- Windows XP中文版應(yīng)用基礎(chǔ)
- PostgreSQL Administration Essentials
- 大學(xué)計(jì)算機(jī)應(yīng)用基礎(chǔ)
- Cloudera Administration Handbook
- INSTANT Autodesk Revit 2013 Customization with .NET How-to
- 可編程序控制器應(yīng)用實(shí)訓(xùn)(三菱機(jī)型)
- 基于32位ColdFire構(gòu)建嵌入式系統(tǒng)
- 分析力!專(zhuān)業(yè)Excel的制作與分析實(shí)用法則
- 大數(shù)據(jù)技術(shù)基礎(chǔ):基于Hadoop與Spark
- 軟件構(gòu)件技術(shù)
- Learning Cassandra for Administrators
- Red Hat Enterprise Linux 5.0服務(wù)器構(gòu)建與故障排除