Logistic function หรือ Sigmoid function [1]
เมื่อ
คือ Euler's number [2]
k คือ ความชัน
ค่าที่อยู่ตรงกลางของ Sigmoid (Sigmoid midpoint)
คือจำนวนจริง มีค่าระหว่าง
L คือ maximum value
standard Logistic function คือ Logistic function ที่มีค่าของ L = 1, และ k = 1 ได้สมการคือ
หรือ
Logistic Regression
Logistic regression คือ classification algorithm เทียบกับ Linear Regression , แล้ว Logistic Regression ไม่ใช้ค่าของ Response variable (h(x)) โดยตรง แต่ใช้ค่าความน่าจะเป็น ของ Response variable ผ่าน Logistic function
เมื่อ คือ Logistic function หรือ Sigmoid function ของ และ
(probability ของ y ที่จะมีค่าเป็น 1 เมื่อ x ใช้ parameter ในทางตรงข้ามจะได้
Update rule (Stochastic gradient descent) [4][5]
เมื่อ คือ Learning rate
[Download Code ]
เอกสารอ้างอิง
[1] https://en.wikipedia.org/wiki/Logistic_function
[2] https://en.wikipedia.org/wiki/E_(mathematical_constant)
[3] https://en.wikipedia.org/wiki/Logistic_regression
[4] http://thegrandjanitor.com/2015/08/20/gradient-descent-for-logistic-regression/
[5] http://www.holehouse.org/mlclass/06_Logistic_Regression.html
![]() |
Sigmoid curve |
เมื่อ
k คือ ความชัน
L คือ maximum value
standard Logistic function คือ Logistic function ที่มีค่าของ L = 1,
หรือ
Logistic Regression
Logistic regression คือ classification algorithm เทียบกับ Linear Regression ,
เมื่อ
จะตีความ ที่ได้ว่าเป็น "probability" ของ Response variable (y) จะมีค่าเป็น "1"
การแบ่งกลุ่มสามารถอาศัยค่าความน่าจะเป็นเหมือนกับการใช้คำตอบ "ใช่" กับ "ไม่ใช่" หรือ "1" กับ "0"
Update rule (Stochastic gradient descent) [4][5]
เมื่อ
[Download Code ]
เอกสารอ้างอิง
[1] https://en.wikipedia.org/wiki/Logistic_function
[2] https://en.wikipedia.org/wiki/E_(mathematical_constant)
[3] https://en.wikipedia.org/wiki/Logistic_regression
[4] http://thegrandjanitor.com/2015/08/20/gradient-descent-for-logistic-regression/
[5] http://www.holehouse.org/mlclass/06_Logistic_Regression.html
ความคิดเห็น
แสดงความคิดเห็น