20250311

Logistic Regression Learning

這是給自己的一份學習紀錄,以免日子久了忘記這是甚麼理論XD Logistic Function (aka logit, MaxEnt) classifier, which means that it is also known as logit regression, maximum-entropy classification(MaxEnt) or the log-linear classifier. In this model, the probabilities from the outcome of predictions is using a logistic function. And what is logistic function? Let talk about it. Here comes from Wikipedia: A logistic function or a logistic curve is a commond S-shaped curve (sigmoid curve) with the equation: $$ f(x) = \frac{L}{1+e^{-k(x-x_o)}}$$ where: ...

March 11, 2025 · 5 min
20241004

Least square estimator of β in linear regression

Assume $$ Y_i = \beta_o + \beta_1X_i+\varepsilon_i $$ , for given $n$ observerd data $(x_i, Y_i)$, $\forall i=1~n$ Note that: $$ Y_i \mid X_i=x_i ~ N(\beta_o+\beta_1X_1, \sigma^2) $$ $\therefore$ $$ E_{Y \mid X}[Y_i \mid X_i =x_i]=\beta_o+\beta_1X_1$$ In vector notation: $$ Y_i = x^T_i\beta + \varepsilon_i $$ where $ x_i=(1, X_1, …, X_n)^T $ And for $ Y = (Y_1, …, Y_n)^T $, We have: $$ Y = X\beta + \varepsilon $$ ...

October 4, 2024 · 2 min
20240930

Linear Regression Learning

這是給自己的一份學習紀錄,以免日子久了忘記這是甚麼理論XD Simple linear regression 給定一組已知的(X, y),其中X,y皆為連續變項 線性迴歸就是由X來預測y 我們總是優先繪製散佈圖,觀察兩變項的變動趨勢 是第一種情況:X愈高,y愈高,還是第二種情況:X愈低,y愈低,又或者是第三種情況:y不會因為X的變動而跟著變動? 第一種稱為正相關,第二種稱為負向關,第三種稱為零相關 若X為一維,則稱為簡單迴歸,其迴歸線方程式為: $$ $$ 若X為多維,則稱為複迴歸,其迴歸方程式為 $$ $$

September 30, 2024 · 1 min