日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

逻辑回归是分类还是回归_分类和回归:它们是否相同?

發布時間:2023/12/15 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 逻辑回归是分类还是回归_分类和回归:它们是否相同? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

邏輯回歸是分類還是回歸

You might have come across the terms Regression and Classification, and might as well think they mean one and the same thing. But this is not true.

您可能遇到過回歸和分類這兩個術語,并且可能還以為它們含義相同。 但是這是錯誤的。

Machine Learning is subdivided largely into supervised and unsupervised. Supervised Learning is further divided into Regression and Classification. Regression deals with predicting the value of a test case given,after learning from the training set taken, whose value is continuous and Classification means categorizing data into a binary test case, say Y/N case or True/False case, learning from the training set. Thus, in classification we play with probabilities and thus predict the outcome.

機器學習主要分為有監督的和無監督的。 監督學習又分為回歸和分類。 回歸處理是在從所接受的訓練集學習后預測給出的測試用例的價值 ,該訓練用例的值是連續的;分類是數據分類為二進制測試用例(例如,Y / N用例或True / False用例),從訓練中學習組。 因此,在分類中我們玩概率,從而預測結果。

For example predicting the height, weight or salary of people fall in the category of Regression. Many regression models can be used to predict these attributes. Classification on the other hand is all about whether or not an action will be performed. For example, Will the people buy a particular car or house given their salary and age, tossing of a fair coin given number of trials, will the investors invest in a specific share given their past interests; all can be classified as Yes or No problems and are examples of classification problems

例如,預測人的身高,體重或薪水屬于回歸。 許多回歸模型可用于預測這些屬性。 另一方面,分類是關于是否執行動作的全部。 例如,人們將根據他們的薪水和年齡來購買特定的汽車或房屋,是否會因經過多次試驗而拋棄公平的硬幣,而投資者會根據他們過去的利益來投資特定的份額; 全部可以歸類為是或否問題,并且是分類問題的示例

In this article I will be touching upon Logistic Regression and how it is used to classify in a problem

在本文中,我將探討邏輯回歸及其如何用于對問題進行分類

邏輯回歸 (Logistic Regression)

You must be familiar with Linear Regression given by the following formula

您必須熟悉以下公式給出的線性回歸

y = b0 + b1*x

y = b0 + b1 * x

Let us consider that y- axis is given by whether a person buys a car or not and x-axis is his age. You will observe that if a person is below a threshold age, he/she never buys the car. Similarly if he is above a certain age he/she always buys the car. Hence, there is a need to remove the lines intersecting the x axis and y=1 line, making it horizontal in these regions. This is where Logistic regression steps in.

讓我們考慮y軸由一個人是否購買汽車給出,x軸是他的年齡。 您將觀察到,如果一個人未滿閾值年齡,則他/她從不購買汽車。 同樣,如果他超過一定年齡,他/她總是買車。 因此,需要去除與x軸和y = 1線相交的線,使其在這些區域中水平。 這就是Logistic回歸介入的地方。

Logistic Regression for a linear model is given by the formula:

線性模型的邏輯回歸由以下公式給出:

ln(P/1-P) = b0 + b1* x

ln(P / 1-P)= b0 + b1 * x

where P is the probability of the case considered.

其中P是考慮情況的概率。

Hence the curve now considers a probability of 1 above a point and probability of 0 below the threshold value. This leaves us with the mid-region denoted by a confusion matrix.

因此,曲線現在考慮在一個點之上的概率為1,在該閾值之下的概率為0。 這給我們留下了由混淆矩陣表示的中間區域。

You might have come across targeted advertising on social media which often leaves you wondering if social media has been stalking you everywhere or not! This targeted advertising is also done through various Machine Learning algorithms.

您可能在社交媒體上遇到了針對性的廣告,這常常使您想知道社交媒體是否一直在纏擾您! 這種針對性的廣告還可以通過各種機器學習算法來完成。

For example, a car company needs to find out whether or not the population will buy an expensive luxury car, given the population age and estimated salary. Let us take the case of linear logistic regression. This can be done by dividing the data collected into training and test set as follows:

例如,一家汽車公司需要根據人口年齡和估算工資,找出人們是否會購買昂貴的豪華車。 讓我們以線性邏輯回歸為例。 可以通過如下方式將收集的數據分為訓練集和測試集來完成:

In the training set the red dots represent that the population will not buy the car and green dots represent that the population will. The logistic regression algorithm will learn from the data and linearly divide the data into two categories, here they are red (will not buy) and green (will buy). Thus the algorithm decides the best fit and applies it to the test set.

在訓練集中,紅點表示該人群不會購買汽車,綠點表示該人群愿意購買汽車。 邏輯回歸算法將從數據中學習并將數據線性分為兩類,這里它們是紅色(不會購買)和綠色(會購買)。 因此,該算法確定最佳擬合并將其應用于測試集。

We can observe that the logistic regression classification model almost successfully predicts whether the population will buy the luxury car or not, given their age and estimated salary.

我們可以觀察到,根據年齡和估算工資,邏輯回歸分類模型幾乎可以成功預測人口是否會購買豪華車。

The outcomes and shortcomings of this model can be addressed in other regression models. This is the basic intuition about Regression and Classification.

該模型的結果和缺點可以在其他回歸模型中解決。 這是關于回歸和分類的基本直覺。

Written By:

撰寫人:

Jayesh Kumar

杰伊什·庫瑪(Jayesh Kumar)

3rd Year, ECE

歐洲經委會三年級

MIT Manipal, India

印度麻省理工學院馬尼帕爾

Originally published at https://www.linkedin.com on February 27, 2019

最初于 2019年2月27日 發布在 https://www.linkedin.com

翻譯自: https://medium.com/swlh/classification-and-regression-are-they-the-same-3fd86714daa3

邏輯回歸是分類還是回歸

總結

以上是生活随笔為你收集整理的逻辑回归是分类还是回归_分类和回归:它们是否相同?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。