Life saving tips for PyDev

I wrote a very useful post a year ago, talking about 20 life-saving tips in Eclipse: http://maider.blog.sohu.com/281903297.html. In that context, the tips focus more on efficiency during Java development. In this post, several tips particularly useful for Python developers are collected. I will continue updating the post whenever I find something useful. 1. Press `F2` …

How does gradient vanish in Multi-Layer Neural Network?

Background This post reviews how we update weights using the back propagation approach in a neural network. The goal of the review is to illustrate a notorious phenomenon in training MLNN, called “gradient vanish”. Start Let’s suppose that we have a very simple NN structure, with only one unit in each hidden layer, input layer …

How to view all columns of a data.frame in R

If you want to view a large data.frame with a large number of columns in R, you will only see first several columns in the UI. After reading this post, I found that if using utils::View(your_data_frame) , you can view all the columns in a new window. Reference: http://stackoverflow.com/questions/19341853/r-view-does-not-display-all-columns-of-data-frame

Logical deduction in NP-completeness proof

Maybe it sounds simple to computer scientists, I just want to backup some logical deduction of myself in NP-completeness proofs in case I will deal with such proofs in the future. In NP-completeness proof, we always want to find a polynomial-time reduction (transformation) from problem A to problem B, denoted as: We say that there …

A general way to add backslash on symbols in latex

You know, in latex you can type \neq  to make an inequation symbol: `$latex \neq$`   Of course, you don’t want to remember how to type in latex all symbols with backslash on them. So here is a general way to add backslash on any symbol in latex: add `\not` in front of a normal …

Proof that BFS finds shortest distance

Intuitively, Breadth-First Search (BFS) can find shortest distances from a source $latex s&s=4$ to any other reachable vertex. However, proving this intuition needs a bit hard work. After some searches, I found that there are two ideas to prove it. The two ideas both use induction to prove it. Both ideas require a bit long proof. …