kNN Classify Handwritten Digits

kNN Intuition As a common nonparametric learning algorithm, the intuition behind kNN is pretty simple. For every unclassified test point, find k nearest neighbors in the training dataset. Then predict the class of the test point according to the classes of these k nearest neighbors. To be summary, it’s a kind of geometric intuition for prediction. kNN Distance Metric The most widely used distance metric is $L_p$ distance. The distance between $x_i$ and $x_j$ is: in which $x_i$ and $x_j$ both have $n$ dimensions. Specifically, when $p = 2$, it’s Euclidean distance; when $p = 1$, it’s Manhattan distance. Because...…

Share this Post

My Roadmap to Emacs

Emacs Emacs is yet another editor available in Unix. Comparing to Vi/Vim, Emacs may not initialize as quickly as vim, but it has more powerful customization ability than vim. Before I learn to use Emacs, I use vim as my daily editor, and I love it deeply. Up to this day, I use both Emacs and Vim as my daily editor for different scenarios. Basically, I use vim for source code quick view and basic editing with its great syntax highlight and code folding supports. Most importantly, Vim can be opened or closed smoothly which adapts to its usage scenarios....…

Share this Post

Caffe MNIST tutorial-LeNet

Install Caffe On the official document page, BVLC already provides detailed instruction to guide users. However there are so many prerequsites to install. Luckily, I use Arch Linux, and there are advanced tools(pacman & aur tool) on Arch Linux to resolve these dependency problems. On AUR, there are serveral Caffe repositories to install Caffe using only one command. But they are different in configuration. For me, normally I develop basic model on laptop and then go further to train larger model on remote GPU servers with preinstalled Caffe. The repo caffe-cpu-git is enough for me. After choose the repo, just...…

Share this Post

Chengdu, Chengdu

First Image to Chengdu Before I went to Chengdu, I was told it’s a cultural city with spicy foods and beautiful girls. Indeed, it’s a fair review to Chengdu for many people. I couldn’t agree more. However, I found more interesting things about Chengdu after I began my university life in there. Four years ago, I went to Chengdu by train, a 24-hours long trip from my hometown. After passed through the Qinling Mountains, there are still numerous mountains in Sichuan, but when you nearly arrived in Chengdu, the terrain slopes gently. At that moment, I felt deeply about what...…

Share this Post

Open FIESTA深圳行

Open FIESTA简介 Open FIESTA的全称是Open Faculty for Innovation, Education, Science, Technology and Art,是清华大学和法国交叉研究中心(CRI)的联合培养项目。从Open FIESTA的全称以及合作机构不难看出它关注跨学科的创新培养,致力于融合全球创新资源,探索促进科学、教育与创新发展的新方法与新技术,培养具有创造精神,创想思维,综合创新能力以及高度社会价值责任感的创新人才。项目的发起人是一直活跃于清华创新教育领域的徐芦平教授。 协同设计,工作坊 2016年的第一个星期六,我有幸参加了成都法语联...…

Share this Post