神經網絡和深度學習

神經網路基礎

2.3 logistic迴歸損失函數

  • Loss (error) function:
    The loss function measures the discrepancy between the prediction (𝑦̂(𝑖)) and the desired output (𝑦(𝑖)).In other words, the loss function computes the error for a single training example.
  • Cost function:
    The cost function is the average of the loss function of the entire training set. We are going to find the
    parameters 𝑤 𝑎𝑛𝑑 𝑏 that minimize the overall cost function.

2.4 梯度下降法

  • 由上所述, logistic迴歸是一種有監督的機器學習算法, 總目標就是使Cost function最小. 而Cost function是關於𝑤、𝑏的二元函數, 該學習過程即是不斷修正𝑤、𝑏的過程:
while condition_x:
    𝑤 = 𝑤 - α*d_𝑤
    𝑏 = 𝑏 - α*d_𝑏
    pass
# 其中dx是Cost function對x的偏微分

2.5 - 2.6 導數

  • 把導數看作函數的斜率(這裏有點微積分的基礎就會懂,不多記)

2.7 計算圖

  • 就是tensorflow種compute graph那一套, Andrew這裏介紹這個思想主要是想講前向、後向傳播的過程
發佈了45 篇原創文章 · 獲贊 31 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章