【如何解決模型 imbalanced data的問題】
機器學習上的Binary Classification在做的事情,舉例來說,是將歷史資料標籤為「會下雨」和「不會下雨」讓機器去學習,當遇到一筆新的天氣資料時,再去判斷這會不會下雨。或股市「會漲」或「不會漲」、這朵香菇「有毒」或「無毒」…
但如果像火災或地震等巨災(發生頻率超低、但一旦發生就損傷無數的事件)這種「會發生」和「「不會發生」事件的資料比例超級不平衡時,資料科學家該怎麼處理呢?
前公司的Data Science Team主管針對這種 imbalanced data 的處理方式寫了一篇介紹,很精闢😬 在這邊節錄一些觀點讓大家看看想想:
\\
當模型的資料不平衡時,可能在預測「不會發生」火災的精準度會高達99.9%。但預測這麼精準根本一點用也沒有,因為大家都知道它平常就是不會發生火災!
重點在於:一旦發生的損失超高!因此:
1. 衡量這個Model時就不能用「精準度」(幹不用機器學習模型,我也知道這個地方發生火災的機率是0.1%啊)
而是要改採用「失誤預測的損失成本」去衡量,比如「真實有發生火災 vs 預測沒火災」的預測錯誤成本,就比「真實沒發生火災 vs 預測有火災」的還更高。
算出平均每筆資料的成本是多少,就能更接近真實需求。
2. 將評估火災的方式改成 Precision at 10,也就是我預測的前 10 名裡面,有多少比例真的有發生火災,以更好分派人力駐守。
也就是把問題從「Clssification」,改成解「Ranking」的問題。
\\
大家快推大神的文章才能有下集可以看~(筆記)
「binary classification model」的推薦目錄:
- 關於binary classification model 在 寫點科普 Facebook 的最讚貼文
- 關於binary classification model 在 Tutorial 110 - Binary Classification using Deep Learning 的評價
- 關於binary classification model 在 Binary Classification.ipynb - Colaboratory - Google Colab 的評價
- 關於binary classification model 在 Does the output of a binary classification model equal to the ... 的評價
- 關於binary classification model 在 Binary classification in R - Sean Trott 的評價
- 關於binary classification model 在 Binary classification not training correctly - Stack Overflow 的評價
- 關於binary classification model 在 Binary Classification using Machine Learning - GitHub 的評價
binary classification model 在 Binary Classification.ipynb - Colaboratory - Google Colab 的推薦與評價
Modify the classification threshold and determine how that modification influences the model. Experiment with different classification metrics to determine your ... ... <看更多>
binary classification model 在 Does the output of a binary classification model equal to the ... 的推薦與評價
YES AND NO. FIRST THE YES. In theory, this is true. Start with logistic regression. That explicitly models the log-odds, which you can ... ... <看更多>
binary classification model 在 Tutorial 110 - Binary Classification using Deep Learning 的推薦與評價
Code associated with these tutorials can be downloaded from here: https://github.com/bnsreenu/python_for_image_processing_APEERBinary ... ... <看更多>