Xu Cui

 

   



544 Stories by Xu Cui

Meaning of correlation coefficient

If variable X and Y has correlation 0.1, how much does it help to predict Y based on X? In the simplest binary case, the probability (p) to correctly predict Y based on X is a linear function of correlation (c), i.e. $$p=\frac{c+1}{2}$$ That means, a
1 14 sec read

Octopus Paul, hypothesis, p-Value and significance

Null hypothesis (H0): Octopus Paul doesn’t have the ability to predict. Or, the probability that he predicts correctly on each event is 1/2. Data: In 2010 World Cup, Octopus Paul correctly predicted the outcomes of 8 games out of 8 games. p-Val
0 16 sec read

Peaya officially launches

The goal of Peaya  is to make your academic life more fun and more productive. Peaya Comics Comic strips about our academia life – the excitement, joy, depression, and pain.  We hope the strips will make you smile. Below is the latest comics: Peaya P
0 29 sec read

How to determine the voxel size in an image

Tools: SPM, cor2mni Assume the image is “a.img”, do v = spm_vol('a.img'); v.mat If v.mat is a diagonal matrix, you can simply read the number and they are the voxel size in mm. If not, a trick is to calculate the distance between adjacent
1 40 sec read

MatLab surface lighting

Here are some parameters in matlab lighting. I first use patch command to plot the surface, then use camlight to shed some light on the surface.
0 7 sec read

Copy/Paste keyboard shortcut doesn’t work under Mac

In your AIR application, if you overwrite the application menu, you might find that the keyboard shortcuts (e.g. Cmd-C, V) doesn’t work under Mac. It seems the “Edit” menu in the default application is essential to these functions.
0 12 sec read

SVM regression with libsvm

SVM is mostly commonly used for binary classifications. But one branch of SVM, SVM regression or SVR, is able to fit a continuous function to data. This is particularly useful when the predicted variable is continuous. Here I tried some very simple c
139 1 min read

Brain surface plot with MatLab

This is an example of brain activation plotted on surface. In many circumstances surface view is much more straightforward than a slice view. Here is how I created such a plot using MatLab and SPM. Environment and Tools: Windows XP MatLab (v7.6) SPM
12 1 min read

tcpip connection with pnet

We use TCP/UDP/IP Toolbox 2.0.5 to read and write data from/to a TCPIP port. It’s fast and reliable. The version we use is 2.0.5. Below is a matlab sample script showing how to connect to another computer (called ETG-4000) with TCPIP : %Connect
4 1 min read