In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output.less
Supervised learning problems are categorized into "regression" and "classification" problems. In a regression problem, we are trying to predict results within a continuous output, meaning that we are trying to map input variables to some continuous function. In a classification problem, we are instead trying to predict results in a discrete output. In other words, we are trying to map input variables into discrete categories.ide
Example 1:函數
Given data about the size of houses on the real estate market, try to predict their price. Price as a function of size is a continuous output, so this is a regression problem.學習
We could turn this example into a classification problem by instead making our output about whether the house "sells for more or less than the asking price." Here we are classifying the houses based on price into two discrete categories.this
Example 2:idea
(a) Regression - Given a picture of a person, we have to predict their age on the basis of the given pictureip
(b) Classification - Given a patient with a tumor, we have to predict whether the tumor is malignant or benign.input
在監督學習中,數據集和其對應的正確的輸出是已知的咱們清楚輸入數據和輸出結果之間是有映射關係的。it
監督學習的問題能夠分類爲「迴歸問題」和「分類問題」。在迴歸問題中,咱們嘗試經過模型的繼續輸出來預測接下來的結果,這意味着咱們試圖將輸入變量映射到某個連續函數上去。io
在分類問題中,咱們試圖在離散輸出中預測結果,換句話說咱們試圖將輸入變量映射到離散的類別中。
ex1:
得到房地產市場數據,某地房價與房子面積的對應數據,試着去預測房價。房價做爲以房子面積爲自變量的函數的輸出,因此這是一個迴歸問題。
當把問題變成房子的價格要高於賣價仍是低於賣價時,這就是一個分類問題。在這個問題中咱們將房價分爲兩個離散的類別。
ex2:
(a)迴歸-獲得一張人的圖像,以此爲基礎來預測他的年齡。
(b)分類問題-有一個腫瘤患者,咱們來判斷他腫瘤時惡性仍是良性的。