Mercurial > hg > audiodb
view tests/pointset_test/run-test.sh @ 286:fb8bec5c604e
generated points test, requires compile of audioDB with lshlib and -DQUERY_WITHOUT_NORM. Compares LSHLIB and EXACT retrieval of points on spherical shells at several radii
author | mas01mc |
---|---|
date | Tue, 15 Jul 2008 20:46:25 +0000 |
parents | 781b129925ff |
children | 8fcc7c590a0e |
line wrap: on
line source
#! /bin/bash . ../test-utils.sh if [ -f testdb ]; then rm -f testdb; fi ${AUDIODB} -d testdb -N intstring 1 > testpower floatstring -1 >> testpower ${AUDIODB} -d testdb -P NPOINTS=100 NDIM=10 if [ -d rad[0-9]* ]; then rm -r rad[0-9]*; fi for j in 1 2 3 9 do mkdir -p "rad$j" ./genpoints2 ${NPOINTS} $(( j*j )) ${NDIM} mv testfeature* "rad$j" done for i in rad[0-9]/* do ${AUDIODB} -d testdb -I -f $i -w testpower done # sequence queries require L2NORM ${AUDIODB} -d testdb -L rm -f testdb.lsh.* LSH_K=10 LSH_M=5 INDEXING=true if [ ${INDEXING} ] then for j in 1 2 3 9 do ${AUDIODB} -d testdb -X -R $(( j*j )) -l 1 --lsh_N 1000 \ --lsh_b 1000 --lsh_k ${LSH_K} --lsh_m ${LSH_M} --absolute-threshold -1 done fi for j in 1 2 3 9 do ${AUDIODB} \ -d testdb -Q sequence -R $(( j*j )) \ -l 1 -f queryfeature -w testpower --absolute-threshold -1 -e -r 400 > output echo APPRX points retrieved at Radius $j: \ `egrep "^rad1" output | wc | awk '{print $1}'` \ `egrep "^rad2" output | wc | awk '{print $1}'` \ `egrep "^rad3" output | wc | awk '{print $1}'` \ `egrep "^rad9" output | wc | awk '{print $1}'` done rm -f *.lsh* echo for j in 1 2 3 9 do ${AUDIODB} \ -d testdb -Q sequence -R $(( j*j )) \ -l 1 -f queryfeature -w testpower --absolute-threshold -1 -e -r 400 > output echo EXACT points retrieved at Radius $j: \ `egrep "^rad1" output | wc | awk '{print $1}'` \ `egrep "^rad2" output | wc | awk '{print $1}'` \ `egrep "^rad3" output | wc | awk '{print $1}'` \ `egrep "^rad9" output | wc | awk '{print $1}'` done