Sunday, November 14, 2010
k_NN
http://saravananthirumuruganathan.wordpress.com/2010/05/17/a-detailed-introduction-to-k-nearest-neighbor-knn-algorithm/
http://simsearch.yury.name/tutorial.html
http://people.revoledu.com/kardi/tutorial/DecisionTree/how-decision-tree-algorithm-work.htm
http://simsearch.yury.name/tutorial.html
http://people.revoledu.com/kardi/tutorial/DecisionTree/how-decision-tree-algorithm-work.htm
Monday, September 20, 2010
Preprocessing notes
tUse CProgram/CreateAudioInp to split data into a uniform size of small segments and connect each segments with other pattern's segment.
The if MPI can't handle the pattern (as it's too large), split the file into several small files. where first few lines into first file while another few line intond the second file and so on
The if MPI can't handle the pattern (as it's too large), split the file into several small files. where first few lines into first file while another few line intond the second file and so on
Tuesday, September 14, 2010
searching function
http://www.infosysblogs.com/microsoft/2006/10/binary_and_linear_search_how_d.html
Monday, June 21, 2010
Sunday, June 20, 2010
To import the image file into vector and save it into a file.
To import the image file into vector and save it into a file.
matlab
function [] = process_img(J,iname)
%%
%filename0 = ['C:\Documents and Settings\amiza\Desktop\airplanepart\noiseImage\st\' iname '.st'];
filename0 = ['C:\Documents and Settings\amiza\Desktop\testflat.dat'];
file_1 = fopen(filename0,'w')
[m,n] = size(J);
%fh = fopen(...);
for i = 1:m
for j = 1:n
fprintf(file_1,'%d',J(i,j));
end
fprintf(file_1,'\n');
end
fclose(file_1);
%close(fh);\
at command window:
J= imread('C:\Documents and Settings\amiza\My Documents\My Dropbox\myphotos\flattopo.bmp')
process_img(J)
matlab
function [] = process_img(J,iname)
%%
%filename0 = ['C:\Documents and Settings\amiza\Desktop\airplanepart\noiseImage\st\' iname '.st'];
filename0 = ['C:\Documents and Settings\amiza\Desktop\testflat.dat'];
file_1 = fopen(filename0,'w')
[m,n] = size(J);
%fh = fopen(...);
for i = 1:m
for j = 1:n
fprintf(file_1,'%d',J(i,j));
end
fprintf(file_1,'\n');
end
fclose(file_1);
%close(fh);\
at command window:
J= imread('C:\Documents and Settings\amiza\My Documents\My Dropbox\myphotos\flattopo.bmp')
process_img(J)
Wednesday, May 5, 2010
audio view using matlab
funky = wavread('funky.wav');
[funky, f] = wavread('funky.wav');
wavplay(funky, f);
subplot(2,1,1), plot(funky), title('Entire waveform');
plot small range only
-----------------------
smallRange = 100000:100000+floor(f/100);
subplot(2,1,2), plot(smallRange, funky(smallRange)), title('100 milliseconds');
Spectrogram:
specgram(funky, 512, f);
View waveform:
subplot(2,1,1), plot(funky), axis('tight');
subplot(2,1,2),
[funky, f] = wavread('funky.wav');
wavplay(funky, f);
subplot(2,1,1), plot(funky), title('Entire waveform');
plot small range only
-----------------------
smallRange = 100000:100000+floor(f/100);
subplot(2,1,2), plot(smallRange, funky(smallRange)), title('100 milliseconds');
Spectrogram:
specgram(funky, 512, f);
View waveform:
subplot(2,1,1), plot(funky), axis('tight');
subplot(2,1,2),
Thursday, April 15, 2010
Error c++: *** glibc detected *** double free or corruption (fasttop): 0x08097c40 *** Aborted
That is Linux C++ error.
solve it with this:
just type:
export MALLOC_CHECK_=0
solve it with this:
just type:
export MALLOC_CHECK_=0
Wednesday, April 14, 2010
Testing dataset path
/media/TOSHIBA/SongCorpus/allSong.arff
/media/TOSHIBA/SongCorpus/blues/Polluted1024/WN/polluted1024WN.arff/media/TOSHIBA/SongCorpus/blues/blues8000/GWN/1024/bluesGWN.arff
/media/TOSHIBA/SongCorpus/blues/1024SongDistortion/1024SongDistortion.arff
Sunday, March 21, 2010
InstanceViewer
in InstanceViewer/bin:
java Viewer -sv 0 3 /media/TOSHIBA/SongCorpus/blues/blues8000/1024Song.arff /media/TOSHIBA/SongCorpus/blues/blues8000/1026Song.arff
java Viewer -av 0 3 4 /media/TOSHIBA/SongCorpus/blues/blues8000/1024Song.arff /media/TOSHIBA/SongCorpus/blues/blues8000/1026Song.arff
ps make sure weka.jar and weka-src.jar are located at usr/lib/jvm/java6/jre/lib/ext
java Viewer -sv 0 3 /media/TOSHIBA/SongCorpus/blues/blues8000/1024Song.arff /media/TOSHIBA/SongCorpus/blues/blues8000/1026Song.arff
java Viewer -av 0 3 4 /media/TOSHIBA/SongCorpus/blues/blues8000/1024Song.arff /media/TOSHIBA/SongCorpus/blues/blues8000/1026Song.arff
ps make sure weka.jar and weka-src.jar are located at usr/lib/jvm/java6/jre/lib/ext
Monday, March 8, 2010
Compiling java program with imported library
For linux users:
put all the libraries (.jar) into your jre/lib/ext then compile as usual.
note that if you use synaptic to install your jdk, the location of your jdk is at /usr/lib/jvm/jdk6..
put all the libraries (.jar) into your jre/lib/ext then compile as usual.
note that if you use synaptic to install your jdk, the location of your jdk is at /usr/lib/jvm/jdk6..
Tuesday, January 26, 2010
Unable to access webpage when connected with Huawei E220 wireless modemn
The latest ubuntu distro was automatically detected my Huawei E220 wireless modemn and I managed to connect to the internet. However, it was so strange as I was able to get online on Skype but cant access webpage. Fortunately, someone was online and helped me to fix this. Initially I thought it was because of the proxy server setting on Firefox but it turned out that was not the reason. Ping google.com but failed then the problem was because of the DNS server setting. So what we did:
1. edit /etc/resolv.conf file
the file was read only therefore I needed to change the file mode to write first
chmod a+rw /etc/resolv.conf
change the name server
8.8.8.8
8.8.4.4
*this is google server
2. Done
Million thanks to Mr. Coffee!!!
1. edit /etc/resolv.conf file
the file was read only therefore I needed to change the file mode to write first
chmod a+rw /etc/resolv.conf
change the name server
8.8.8.8
8.8.4.4
*this is google server
2. Done
Million thanks to Mr. Coffee!!!

Monday, January 25, 2010
Simple makefile programming with while loops
SOURCEPATH = ~/extracted
SONGNAME = Song
SONGID = 98
NUMFILE = 220;
move:
COUNTER=1
while [[ $$COUNTER -le 9 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/extracted/$(SONGID)$(SONGNAME)-0$$COUNTER.wav ~/SplittedFiles/$$COUNTER ; \
((COUNTER = COUNTER + 1)) ;\
done
COUNTER=10
while [[ $$COUNTER -le 220 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/extracted/$(SONGID)$(SONGNAME)-$$COUNTER.wav ~/SplittedFiles/$$COUNTER ; \
((COUNTER = COUNTER + 1)) ;\
done
back:
COUNTER=1
while [[ $$COUNTER -le 9 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/SplittedFiles/$$COUNTER/$(SONGID)$(SONGNAME)-0$$COUNTER.wav ~/extracted ; \
((COUNTER = COUNTER + 1)) ;\
done
COUNTER=10
while [[ $$COUNTER -le 220 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/SplittedFiles/$$COUNTER/$(SONGID)$(SONGNAME)-$$COUNTER.wav ~/extracted ; \
((COUNTER = COUNTER + 1)) ;\
done
check:
COUNTER=1
while [[ $$COUNTER -le 220 ]]; do \
ls ~/SplittedFiles/$$COUNTER ; \
((COUNTER = COUNTER + 1)) ;\
done
clean:
COUNTER=1
while [[ $$COUNTER -le 9 ]]; do \
$(RM) $(SOURCEPATH)/$(SONGID)$(SONGNAME)-0$$COUNTER.wav ; \
((COUNTER = COUNTER + 1)) ;\
done
COUNTER=10
while [[ $$COUNTER -le 220 ]]; do \
$(RM) $(SOURCEPATH)/$(SONGID)$(SONGNAME)-$$COUNTER.wav ; \
((COUNTER = COUNTER + 1)) ;\
done
make move- move a batch of files into another folder
SONGNAME = Song
SONGID = 98
NUMFILE = 220;
move:
COUNTER=1
while [[ $$COUNTER -le 9 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/extracted/$(SONGID)$(SONGNAME)-0$$COUNTER.wav ~/SplittedFiles/$$COUNTER ; \
((COUNTER = COUNTER + 1)) ;\
done
COUNTER=10
while [[ $$COUNTER -le 220 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/extracted/$(SONGID)$(SONGNAME)-$$COUNTER.wav ~/SplittedFiles/$$COUNTER ; \
((COUNTER = COUNTER + 1)) ;\
done
back:
COUNTER=1
while [[ $$COUNTER -le 9 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/SplittedFiles/$$COUNTER/$(SONGID)$(SONGNAME)-0$$COUNTER.wav ~/extracted ; \
((COUNTER = COUNTER + 1)) ;\
done
COUNTER=10
while [[ $$COUNTER -le 220 ]]; do \
echo The counter is $$COUNTER ; \
cp ~/SplittedFiles/$$COUNTER/$(SONGID)$(SONGNAME)-$$COUNTER.wav ~/extracted ; \
((COUNTER = COUNTER + 1)) ;\
done
check:
COUNTER=1
while [[ $$COUNTER -le 220 ]]; do \
ls ~/SplittedFiles/$$COUNTER ; \
((COUNTER = COUNTER + 1)) ;\
done
clean:
COUNTER=1
while [[ $$COUNTER -le 9 ]]; do \
$(RM) $(SOURCEPATH)/$(SONGID)$(SONGNAME)-0$$COUNTER.wav ; \
((COUNTER = COUNTER + 1)) ;\
done
COUNTER=10
while [[ $$COUNTER -le 220 ]]; do \
$(RM) $(SOURCEPATH)/$(SONGID)$(SONGNAME)-$$COUNTER.wav ; \
((COUNTER = COUNTER + 1)) ;\
done
make move- move a batch of files into another folder
Thursday, January 21, 2010
Software for audio processing
1. Most common - Audacity
2. WaveBreaker - break a big wav fie into smaller parts - Linux
3. Wavosaur-windows
2. WaveBreaker - break a big wav fie into smaller parts - Linux
3. Wavosaur-windows
errors found in Debian based OS
1. Software installation:
configure: error: Package requirements (gtk+-2.0 libxml-2.0) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
solution:
install libgtk2.0-dev
install libxml-dev.
configure: error: Package requirements (gtk+-2.0 libxml-2.0) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
solution:
install libgtk2.0-dev
install libxml-dev.
Tuesday, January 19, 2010
Using marsyas
1. Create a collection
ls /home/gtzan/data/sound/reggae/*.wav > reggae.mf
automatically:
mkcollection -c reggae.mf -l music /home/gtzan/data/sound/
2. Feature extraction
bextract music.mf speech.mf -w ms.arff -p ms.mpl -cl
bextract ms.mf -w ms.arff -p ms.mpl
bextract -mfcc classical.mf jazz.mf rock.mf -w genre.arff
./bextract -sv cl.mf ja.mf ro.mf -w genres.arff -p genres.mpl
Monday, January 11, 2010
Subscribe to:
Posts (Atom)
