iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 1
0
自我挑戰組

R語言與演算法自學系列 第 1

Day 1 開賽熱熱身

  • 分享至 

  • xImage
  •  

近期動態是利用Coursera學習Machine Learning,在上週結束台灣人工智慧學校的申請及複試後,將前幾週的進度補齊,就先用我上週的學習筆記來做為開賽第一篇。

Classification problem can use Logistic function(Sigmold function) to solve. The value of Y is discrete, only shows 0 and 1. For example, whether is E-mail spam or not, we could create a classifier to seperate.

predict "y = 1" if h(x) >= 0.5
predict "y = 0" if h(x) < 0.5

We change the hypothsis to h(x) = g(z) = 1/(1+e^(-z)), z = transpose(theta)×x, to avoid the problem like h(x) > 1 or h(x) < 0, and add some larger x.

Decision boundary

Ex: predict "y = 1" if -1 + x1^2 + x2^2 >= 0, the the boundary is -1 + x1^2 + x2^2 = 0

Cost Function

J(theta) = (1/m)sum(cost(h(x), y), cost(h(x), y) = (-y)log(h(x)) - (1-y)log(1-h(x))

Vectorized implementation

h = g(X×theta), J(theta) = (1/m)×(transpose(-y)log(h) - transpose(1-y)log(1-h))

今天先試試看部分筆記,課程編碼是使用Octave,之後在po作業的程式碼上來。


下一篇
Day 2 DataCamp
系列文
R語言與演算法自學12
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言