機器學習任務:分類!迴歸!分群!
<說說5分鐘>第6說:機器學習的任務種類classification, regression, clustering
先前有提到什麼是機器學習?這個章節,有簡單說明機器學習就是透過機器來自動找到inputs與outputs之間的模式(patterns),形成一個可供預測的模型。
Inputs → Machine(機器電腦) → Model(patterns) ---> predict the un-know
機器學習主要任務可區分下列2種:
Supervised learning (監督式學習)
Unsupervised learning(非監督式學習)
Supervised learning (監督式學習)
The goal of supervised learning is to learn a function that, given a sample of data and desired outputs, best approximates the relationship between input and output observable in the data.
基本上整體過程為: 輸入特徵(input),給定答案(output),期望透過機器去找出兩者之間的關係(function)。未來可以作為預測用。
Classification
監督式學習中預測的Y如果是不連續的值(項目種類),則是分類(classification)。例如:是否退租?是否回購?是否換手機?喜歡什麼顏色?…等。
Regression
監督式學習中預測的Y如果是連續的值,則是迴歸(Regression)。例如:預測房屋價格、預測股價、預測體重、預測購買機率…等。
Unsupervised learning(非監督式學習)
It does not have labeled outputs, so its goal is to infer the natural structure present within a set of data points.we wish to learn the inherent structure of our data without using explicitly-provided labels.
沒有答案(output),只有輸入特徵(input),期望透過機器去找出樣本之間的隱含關係。
非監督式學習中最常用的就是分群(clustering)。例如:顧客分群、喜好分群…等。就像下圖,如果我們預設要分3群,則機器自動根據inputs把特徵相似的卡通人物放在一組。可以發現機器可能認為藍色那組都有"黃色鴨嘴"、"大腳丫"、"纖細的身體",因此歸類在"鴨鴨群"。
總結一下,機器學習的主要任務為下列三種:
分類 classification
迴歸 regression
分群 clustering
而當我們接獲任務,最重要的就是先判別: 要處理的問題是屬於哪一種?!!!!在確認任務後,就可以使用對應的演算法來進行機器學習囉!
再理解機器學習能處理什麼樣的問題(任務)後,我們來聊聊inputs的資料種類吧: )
另外,這邊提供一個只要花30秒就能徹底理解python程式架構的方式,還請參考: