- Create a table where each column represents a different system and each row represents a different domain (data source upon which the evaluations are performed).
- Save this file in csv and import it into MATLAB using the data import wizard or dlmread function.
- Now call one way ANOVA as follows.
[p,t,st] = anova1(dataMatrix) - Now run Tukey HSD using st as follows,
[c,m,h,nms] = multcompare(st)
This blog covers various topics from technical tweaks to latest in computational linguistics, Artificial Intelligence, Machine Learning and Wed Data Mining.
Monday, June 21, 2010
ANOVA and Tukey HSD in MATLAB
To perform ANOVA followed up by Tukey HSD in MATLAB do the following.
Sunday, June 20, 2010
TexShop
In TexShop to autocomplete a bibliography reference or a label just type some part of the reference and press F5 to get a list of candidates.
Thursday, June 3, 2010
Multiprocessing
In Python GIL (Global Interpreter Lock) prevents from running more than one thread at a time in a process. If you use Jython or IronPython this limitation is not there. But with CPython it is there. Use the multiprocess module (from Python version 2.6 afterwards) to overcome this limitation and have truly multiprocessing capabilities. If you encounter an error during execution and if your processes become zombies then you could either close the terminal (which will kill the zombies as well), or more elegantly use kill -9 on the "parent process id (PPID" of those zombies. To find the process ids use "ps -epw" command. You can also kill a process within the top window by typing "k" and then entering the corresponding process id.
multiprocessing module has similar API as in threading module. It works on Windows, Linux and OS/X.
The following code shows how to create and start several processes.
multiprocessing module has similar API as in threading module. It works on Windows, Linux and OS/X.
The following code shows how to create and start several processes.
from multiprocessing import Process import os def info(title): print title print 'module name:', __name__ print 'parent process:', os.getppid() print 'process id:', os.getpid() def f(name): info('function f') print 'hello', name c = 0 for i in range(1,100000): for j in range(1, 100000): if i == j: c += 1 pass if __name__ == "__main__": info('main line') p = Process(target=f, args=('bob',)) q = Process(target=f, args=('sam',)) r = Process(target=f, args=('dan',)) s = Process(target=f, args=('david',)) q.start() p.start() r.start() s.start() p.join() q.join() r.join() s.join() pass
Subscribe to:
Posts (Atom)
Continuously monitor GPU usage
For nvidia GPUs do the follwing: nvidia-smi -l 1
-
If you used Adobe acrobat to annotate a PDF file and you had Acrobat crashed or had to restart the computer abruptly during the annotation p...
-
By default when you install MacTex and use TexShop for writing and compiling latex you will get PDFs with page size A4. This is all fine for...
-
These three terms are explained below. Anaphora is a back ward reference. Ex: I gave a banana to the monkey which it ate. Here "it"...