Machine Learning-PCA(Principal Component Analysis)

Now we have entered in the era of "big data". We have accumulated so many data that we can't all information from them. On the other hand, so many data may form noise to separate you from truth. So to learn potential pattern from given data, we need to pre-train and filter data.?

Now given n samples, x_1,...x_n, in d-dim. If d is very large which means x has many features, then we may do some feature selection before we start to learn. One way is to do principal component analysis for these samples. For example, if all sample points on plane almost lie on one straight line, then that straight line can be seen as 1-dim principal component of data.

Zero-dimension representation by PCA

If we use only one vector to represent all sample points, then the vector must be the average of all sample points.

one-dim representation by PCA

If we want to find one line close to all sample points and use projections to approximate sample points, then the line must go through sample average point.

To find a d'-dim PC of sample points, it is equivalent to solve?

squared error

The vectors e_i all have length 1. So use Lagrange optimization to solve. Then we can get all e_i are eigenvectors of scatter matrix S, that is

scatter matrix

S is n*n matrix which is real and symmetric. Then its eigenvectors are orthogonal and its eigenvalues are nonnegative. The eigenvalues corresponding e_1,...,e_d' are the first d' maximal eigenvalues of S. And the squared error above has an explicit expression by information of S, that is sum of eigenvalues except first d' maximal eigenvalues. And since eigenvectors are orthogonal, they can be used to represent d'-dim subspace center at sample average point.

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市甥厦,隨后出現(xiàn)的幾起案子丙曙,更是在濱河造成了極大的恐慌,老刑警劉巖掏婶,帶你破解...
    沈念sama閱讀 222,946評論 6 518
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異潭陪,居然都是意外死亡雄妥,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,336評論 3 399
  • 文/潘曉璐 我一進店門依溯,熙熙樓的掌柜王于貴愁眉苦臉地迎上來老厌,“玉大人,你說我怎么就攤上這事黎炉≈Τ樱” “怎么了?”我有些...
    開封第一講書人閱讀 169,716評論 0 364
  • 文/不壞的土叔 我叫張陵慷嗜,是天一觀的道長淀弹。 經常有香客問我,道長庆械,這世上最難降的妖魔是什么薇溃? 我笑而不...
    開封第一講書人閱讀 60,222評論 1 300
  • 正文 為了忘掉前任,我火速辦了婚禮缭乘,結果婚禮上沐序,老公的妹妹穿的比我還像新娘。我一直安慰自己堕绩,他們只是感情好策幼,可當我...
    茶點故事閱讀 69,223評論 6 398
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著奴紧,像睡著了一般特姐。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上黍氮,一...
    開封第一講書人閱讀 52,807評論 1 314
  • 那天到逊,我揣著相機與錄音铣口,去河邊找鬼。 笑死觉壶,一個胖子當著我的面吹牛脑题,可吹牛的內容都是我干的。 我是一名探鬼主播铜靶,決...
    沈念sama閱讀 41,235評論 3 424
  • 文/蒼蘭香墨 我猛地睜開眼叔遂,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了争剿?” 一聲冷哼從身側響起已艰,我...
    開封第一講書人閱讀 40,189評論 0 277
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎蚕苇,沒想到半個月后哩掺,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經...
    沈念sama閱讀 46,712評論 1 320
  • 正文 獨居荒郊野嶺守林人離奇死亡涩笤,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 38,775評論 3 343
  • 正文 我和宋清朗相戀三年嚼吞,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片蹬碧。...
    茶點故事閱讀 40,926評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡舱禽,死狀恐怖,靈堂內的尸體忽然破棺而出恩沽,到底是詐尸還是另有隱情誊稚,我是刑警寧澤,帶...
    沈念sama閱讀 36,580評論 5 351
  • 正文 年R本政府宣布罗心,位于F島的核電站里伯,受9級特大地震影響,放射性物質發(fā)生泄漏渤闷。R本人自食惡果不足惜俏脊,卻給世界環(huán)境...
    茶點故事閱讀 42,259評論 3 336
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望肤晓。 院中可真熱鬧,春花似錦认然、人聲如沸补憾。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,750評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽盈匾。三九已至,卻和暖如春毕骡,著一層夾襖步出監(jiān)牢的瞬間削饵,已是汗流浹背岩瘦。 一陣腳步聲響...
    開封第一講書人閱讀 33,867評論 1 274
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留窿撬,地道東北人启昧。 一個月前我還...
    沈念sama閱讀 49,368評論 3 379
  • 正文 我出身青樓,卻偏偏與公主長得像劈伴,于是被迫代替她去往敵國和親密末。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 45,930評論 2 361

推薦閱讀更多精彩內容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,590評論 0 23
  • Suesusu閱讀 165評論 0 0
  • 很長時間里沒有去電影院看電影了□髓担現(xiàn)在的電影很少讓我產生去電影院的沖動严里,加之很多電影很快就會在視頻網站上看到,觀看更...
    Luckymay閱讀 446評論 0 1
  • 嗯追城,說好的考研完事要寫一篇關于你的文∩材耄現(xiàn)在想想也算不上文,而且從考完可能腦細胞死太多座柱,竟然也文藝不起來迷帜,所以沒有煽...
    愛笑的香菇閱讀 333評論 0 2
  • 鏡頭下的世界 是不是和你看的不太一樣 但其實 你的眼睛也是鏡頭 最真的鏡頭 ———————— 這是【每天的話】 每...
    ShawnLim閱讀 227評論 0 0