吳恩達深度學習學習筆記——C3W1——機器學習策略1-1

1.1 爲什麼需要ML策略?

 

問題引入:如何提高機器學習的水平?可能有很多種想法(如,收集更多數據、收集更豐富多樣的訓練數據、增加梯度下降法迭代次數、增加網絡規模、減小網絡規模、使用隨機失活(dropout)、添加L2正則化項、改變網絡架構(激活函數、隱層單元數等)),應該選擇哪些,捨棄哪些?

 

 

1.2 正交化

正交化的一個實例:老式電視機的調節按鈕(上下、左右、形變等),每個按鈕的功能明確而相對對立,即所謂“正交”(orthogonal)

 

機器學習中的假設鏈:

成本函數調優順序:訓練集 -> 開發集(驗證集)-> 測試集 -> 真實世界

 

 

Orthogonalization(正交化)

Orthogonalization or orthogonality is a system design property that assures that modifying an instruction or a component of an algorithm will not create or propagate side effects to other components of the system. It becomes easier to verify the algorithms independently from one another, it reduces testing and development time.

When a supervised learning system is design, these are the 4 assumptions that needs to be true and orthogonal.

1. Fit training set well in cost function

- If it doesn’t fit well, the use of a bigger neural network or switching to a better optimization algorithm might help.

2. Fit development set well on cost function

- If it doesn’t fit well, regularization or using bigger training set might help.

3. Fit test set well on cost function

- If it doesn’t fit well, the use of a bigger development set might help

4. Performs well in real world

- If it doesn’t perform well, the development test set is not set correctly or the cost function is not evaluating the right thing.

 

 

1.3 單一數字評估指標

查準率(Precision)和查全率(Recall)難以同時兼顧,可綜合考慮,用F1值來表示(F1=2PR/(P+R))

 

 

另一個示例:使用平均值評價不同算法

 

查準率、查全率和F1值

 

 

1.4 優化指標和滿足指標

評價指標可分爲兩類:優化指標(optimizing metrices)和滿足指標(satisfying metrices)。優化指標需要重點關注,滿足指標相當於約束條件而不得不考慮。

 

 

Satisficing and optimizing metric

There are different metrics to evaluate the performance of a classifier, they are called evaluation matrices. They can be categorized as satisficing and optimizing matrices. It is important to note that these evaluation matrices must be evaluated on a training set, a development set or on the test set.

Example: Cat vs Non-cat

In this case, accuracy and running time are the evaluation matrices. Accuracy is the optimizing metric, because you want the classifier to correctly detect a cat image as accurately as possible. The running time which is set to be under 100 ms in this example, is the satisficing metric which mean that the metric has to meet expectation set.

The general rule is:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章