ml回归_ML中的分类和回归是什么?
ml回歸
機器學習教程 (MACHINE LEARNING TUTORIAL)
ML is extracting data from knowledge.
ML正在從知識中提取數據。
Machine learning is a study of algorithms that uses a provides computers the ability to learn from the data and predict outcomes with accuracy, without being explicitly programmed. Machine learning is sub-branched into three categories- supervised learning, unsupervised learning, and reinforcement learning.
機器學習是對算法的研究,它使計算機能夠從數據中學習并準確預測結果,而無需進行顯式編程。 機器學習可分為三類:監督學習,無監督學習和強化學習。
Author) 作者提供 ) Machine Learning Model機器學習模型監督學習 (Supervised learning)
As the name “supervised learning” suggests, here learning is based through example. We have a known set of inputs (called features, x) and outputs (called labels, y ). The goal of the algorithm is to train the model on the given data and predict the correct value (y) for an unknown input (x). Supervised learning can be further classified into two categories- classification and regression.
就像“監督學習”這個名字所暗示的那樣,這里的學習是通過示例進行的。 我們有一組已知的輸入(稱為特征,x)和輸出(稱為標簽,y)。 該算法的目標是在給定數據上訓練模型并預測未知輸入(x)的正確值(y)。 監督學習可以進一步分為兩類:分類和回歸。
Classification and regression are two basic concepts in supervised learning. However, understanding the difference between the two can be confusing and can lead to the implementation of the wrong algorithm for prediction. If we can understand the difference between the two and identify the algorithm that has to be used, then structuring the model becomes easy.
分類和回歸是監督學習中的兩個基本概念。 但是,了解兩者之間的差異可能會造成混淆,并可能導致錯誤的預測算法實現。 如果我們能夠理解兩者之間的區別并確定必須使用的算法,那么構造模型就變得容易了。
Classification and regression follow the same basic concept of supervised learning i.e. to train the model on a known dataset to make predict the outcome.
分類和回歸遵循監督學習的相同基本概念 ,即在已知數據集上訓練模型以預測結果。
Here the major difference is that in the classification problem the output variable will be assigned to a category or class (i.e. it is discrete), while in regression the variable output is a continuous numerical value.
此處的主要區別在于,在分類問題中,輸出變量將分配給類別或類(即,它是離散的),而在回歸中,變量輸出是連續的數值。
分類 (Classification)
In classification, the model is trained in such a way that the output data is separated into different labels (or categories) according to the given input data.
在分類中,以如下方式訓練模型:根據給定的輸入數據將輸出數據分為不同的標簽(或類別)。
The algorithm maps the input data (x) to discrete labels (y).
該算法將輸入數據(x)映射到離散標簽(y)。
二進制分類 (Binary classification)
If there are only two categories in which the given data has to be classified then it is called binary classification. For example- checking a bank transaction whether it is a fraudulent or a genuine transaction. Here, there are only two categories (i.e. fraudulent or genuine) where the output can be labeled.
如果只有兩個類別必須對給定數據進行分類,則稱為二進制分類。 例如,檢查銀行交易是欺詐交易還是真實交易。 在這里,只有兩個類別(即欺詐或真實)可以標記輸出。
多類別分類 (Multiclass classification)
In this kind of problem, the input is categorized into one class out of three or more classes.
在這種問題中,輸入被分為三類或更多類中的一類。
Iris dataset is a perfect example of multiclass classification. Iris data set contains data of fifty samples of three species of flower (setosa, versicolor, and virginica) which are classified based on four parameters (sepal length, sepal width, petal length, and petal width).
虹膜數據集是多類分類的完美示例。 虹膜數據集包含三種花(setosa,versicolor和virginica)的五十個樣本的數據,它們基于四個參數(花冠長度,萼片寬度,花瓣長度和花瓣寬度)進行分類。
Author) 作者提供的圖像) Graphical representation of a linear discriminant model of Iris datasetIris數據集的線性判別模型的圖形表示兩種分類器 (Two Kind of Classifiers)
Soft Classifier
軟分類器
A soft classifier predicts the labels for inputs based on the probabilities. For a given input probability for each class (label) is calculated and the input is classified into the class with the highest probability. Higher probability also shows higher accuracy and precision of the model.
軟分類器根據概率預測輸入的標簽。 對于給定的輸入概率,將計算每個類別(標簽)的概率,并將輸入分類為具有最高概率的類別。 較高的概率也表明該模型具有較高的準確性和精度。
The sigmoid function can be used in this model since we have to predict the probabilities. This is because the sigmoid function exists between (0,1) and probability also exists between the same range.
由于我們必須預測概率,因此可以在此模型中使用S型函數。 這是因為S形函數存在于(0,1)之間,概率也存在于相同范圍之間。
Author) 作者 Sigmoid Function)S形函數Hard Classifier
硬分類器
Hard classifiers do not calculate the probabilities for different categories and give the classification decision based on the decision boundary.
硬分類器不會計算不同類別的概率,而是基于決策邊界給出分類決策。
線性和非線性分類器 (Linear and Non- Linear Classifiers)
(Image by Sebastian Raschka on WikimediaCommons) Graph A represents a linear classifier model. Graph B represents a non-linear classifier model.(圖像由Sebastian Raschka在WikimediaCommons上提供 ) 圖A表示線性分類器模型。 圖B表示非線性分類器模型。Linear Classification Model
線性分類模型
When the given data of two classes represented on a graph can be separated by drawing a straight line than the two classes are called linearly separable (in graph A above, green dots and blue dots, these two classes are completely separated by a single straight line).
如果可以通過繪制直線來分離圖上表示的兩個類別的給定數據,則將這兩個類別稱為線性可分離的(在上面的圖表A中,綠點和藍點,這兩個類別完全由一條直線分開)。
There can be infinite lines that can differentiate between two classes.
可能有無限的直線可以區分兩個類別。
To find the exact position of the line, the type of classifier used is called a linear classifier. Few examples of linear classifiers are- Logistic Regression, Perceptron, Naive Bayes, etcetera.
為了找到線的確切位置,使用的分類器類型稱為線性分類器。 線性分類器的幾個例子是-Logistic回歸,Perceptron,樸素貝葉斯等。
Non-Linear Classification Model
非線性分類模型
Here as we can see in graph B (above), two classes cannot be separated by drawing a straight line and therefore requires an alternative way to solve this kind of problem. Here model generates nonlinear boundaries and how that boundary will look like is defined by non-linear classifiers. Few examples of non-linear classifiers are- Decision Trees, K-Nearest Neighbour, Random Forest, etcetera.
正如我們在圖B(上圖)中所見,這里無法通過繪制直線來分離兩個類,因此需要一種替代方法來解決此類問題。 在這里,模型生成非線性邊界,非線性分類器定義了邊界的外觀。 非線性分類器的幾個例子是-決策樹,K最近鄰,隨機森林等。
回歸 (Regression)
Unlike classification, here the regression model is trained in such a way that it predicts continuous numerical value as an output based on input variables.
與分類不同,此處對回歸模型進行了訓練,使其基于輸入變量將連續數值預測為輸出。
The algorithm maps the input data (x) to continuous or numerical data(y).
該算法將輸入數據(x)映射到連續或數值數據(y)。
There are several kinds of regression algorithms in machine learning like- linear regression, polynomial regression, quantile regression, lasso regression, etc. Linear regression is the simplest method of regression.
機器學習中有幾種回歸算法,例如線性回歸,多項式回歸,分位數回歸,套索回歸等。線性回歸是最簡單的回歸方法。
線性回歸 (Linear Regression)
Sewaqu on Sewaqu在WikimediaCommons) WikimediaCommons上的圖像) Graphical Representation of Linear Regression Problem線性回歸問題的圖形表示This approach is generally used for predictive analysis. In this case, a linear relationship is set up between the x-axis feature and the y-axis feature. But as you can see in the graph the line does not pass through every point, but it represents a relationship between the two.
這種方法通常用于預測分析。 在這種情況下,在x軸特征和y軸特征之間建立了線性關系。 但是,正如您在圖表中看到的那樣,該線并沒有穿過每個點,而是代表了兩者之間的關系。
Simple linear regression relation can be represented in the form of an equation as:
簡單的線性回歸關系可以用方程的形式表示為:
y = wx + b
y = wx + b
Here, y is numerical output, w is the weight (slope), x is the input variable and b is the bias (or y-intercept).
此處,y是數字輸出,w是權重(斜率),x是輸入變量,b是偏差(或y截距)。
Regression models can be used in the prediction of temperature, trend forecast, analyze the effect of change of one variable on other variables.
回歸模型可用于溫度預測,趨勢預測, 分析一個變量的變化對其他變量的影響。
結論 (Conclusion)
Supervised learning is the easiest and simplest sub-branch of machine learning. Identification of the correct algorithm to structure the model is very necessary and I hope you are able to understand the difference between regression and classification after reading this article. Try implementing these concepts for better understanding.
監督學習是機器學習最簡單,最簡單的分支。 確定正確的算法以構建模型非常必要,我希望您在閱讀本文后能夠理解回歸和分類之間的區別。 嘗試實施這些概念以更好地理解。
If you have any questions or comments, please post them in the comment section.
如果您有任何問題或意見,請在評論部分中發布。
Understanding Classification and Regression了解分類和回歸 Sources:https://developers.google.com/machine-learning/crash-course/ml-introhttps://www.educative.io/edpresso/what-is-the-difference-between-regression-and-classificationhttps://www.statisticssolutions.com/what-is-linear-regression/https://www.geeksforgeeks.org/ml-classification-vs-regression/Originally Published On: https://patataeater.blogspot.com/
最初發布于: https : //patataeater.blogspot.com/
翻譯自: https://towardsdatascience.com/what-are-classification-and-regression-3677987b9422
ml回歸
總結
以上是生活随笔為你收集整理的ml回归_ML中的分类和回归是什么?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 快手极速版戳一下怎么取消
- 下一篇: 逻辑回归是分类还是回归_分类和回归:它们