This shows you the differences between two versions of the page.

Link to this comparison view

nlp-private:detware [2015/04/22 15:09] (current)
ryancha created
Line 1: Line 1:
 +'''​DETware'''​ is the software package responsible for generating DET curves, used by the Spoken Language ID project. It can be obtained at [http://​www.nist.gov/​speech/​tools/​index.htm http://​www.nist.gov/​speech/​tools/​index.htm]. Within the Language-ID project it is located at [http://​nlp.cs.byu.edu/​trac/​NIST/​browser/​HEAD/​Language-ID/​scripts/​detware Language-ID/​scripts/​detware/​]. DETware has been partially replaced by [[Feature Engineering Console]]'​s [[DetcurveChartPanel]] and associated data structures, which can plot DET curves for any sort of [[IdentificationResult]].
 +As of [revision #], building of DETware is handled by the [[CMake]]-based build system. Run <​code>​make</​code>​ or <​code>​make detware</​code>​ build it.
 +If you wish to build DETware manually, run the following commands within the '''​Language-ID/​scripts/​detware/​bin'''​ directory:
 +:<​code>​gcc -Wall -std=c89 ./hd_dcf.c -o win/​hd_dcf.exe<​br/></​code>​
 +:<​code>​gcc -Wall -std=c89 ./plot.c -o win/​plot.exe</​code>​
 +*Use the -fno-stack-protector option to disable stack smashing protection in newer compiler versions such as that in Ubuntu 7.04. The detware code doesn'​t quite play by the rules pointers-wise,​ so stack smashing protection causes the executable to bail out early.
 +*It seems that an additional stack size parameter is necessary when building in non-cygwin environments. Could this be related to stack smashing protection?
 +See the [http://​nlp.cs.byu.edu/​trac/​NIST/​changeset/​123 r123] log message for more details.
 +This line of Ruby code invokes the plot executable: <​code>​system_dbg("​${PLOT_EXE} #​{output_dir}/​TAR #​{output_dir}/​NON #​{output_dir}/​DET_nist"​)</​code>​
 +Therefore the output files written by the plot executable are formulated in the following way:<​br/>​
 +<​code>​tarfile:​ argv[1] -> TAR<​br/>​
 +nonfile: argv[2] -> NON<​br/>​
 +outfile: argv[3] -> DET_nist<​br/>​
 +bestfile: argv[3] + "​.points"​ -> DET_nist.points</​code>​
 +===TAR (tarfile)===
 +<​code>​while (fscanf (tarfile, "%lf \n", tarptr) > 0)<​br/>​
 +===NON (nonfile)===
 +<​code>​while (fscanf (nonfile, "%lf \n", nonptr) > 0)<​br/>​
 +===DET_nist (outfile)===
 +'''​Graph data in Normal Deviate Form; see the gnuplot scripts for the hackish way of graphing it -- mapping NDF values to regular values'''​
 +The file is generated with the following two lines of code:<​br/>​
 +<​code>​for (i = 0; i < npts; i++)<​br/>​
 +fprintf (outfile, "%lf %lf %lf %lf\n",​ pts[i][0], pts[i][1], pts[i][2], pts[i][3]);</​code>​
 +Note that Pdet is a pointer to the same array as pts. pts is thus populated as follows:<​br/>​
 +When npts == 0:<​br/>​
 +<​code>​Pdet[npts][0] = ppndf (PMIN);<​br/>​
 +Pdet[npts][1] = ppndf (PMAX);<​br/>​
 +Pdet[npts][2] = PMIN;<​br/>​
 +Pdet[npts][3] = PMAX;</​code>​
 +When npts != 0:<​br/>​
 +<​code>​Pdet[npts][2] = ((double) (ntrue-1) / (double) num_true);<​br/>​
 +Pdet[npts][3] = ((double) (num_false - (nfalse-1)) / (double) num_false);<​br/>​
 +Pdet[npts][0] = ppndf (Pdet[npts][2]);<​br/>​
 +Pdet[npts][1] = ppndf (Pdet[npts][3]);</​code>​
 +===DET_nist.points (bestfile)===
 +<​code>​fprintf (bestfile, "%lf %lf %lf %lf %lf %lf %lf\n",​ DCF_best[0],​ DCF_best[1],​ DCF_best[2],​DCF_best[3],​ DCF_best[4],​ DCF_best[5],​ DCF_best[6]);<​br/>​
 +fprintf (bestfile, "%lf %lf %lf %lf %lf %lf\n",​ eer[0], eer[1], eer[2], eer[3], eer[4], eer[5]);</​code>​
 +==Normal Deviate==
 +In essence, the ppndf function is equivalent to the normsinv function of any spreadsheet. You can go the other direction with a normsdist function.
 +Please see the [http://​www.oasis-open.org/​committees/​download.php/​24700/​openformula-20070720.odt OpenFormula draft] for detailed information on implementations of particular functions.  ​
 +Also known as normsdist?
 +Hmm... that's not the cumulative function, therefore it isn't right.
 +Question: What do we set the mu and sigma to? The spreadsheet version of the function seems to ignore that; is there a default?<​br/>​
 +Answer: Yes, the default is mu==0.0 and sigma==1.0
 +Also known as normsinv?
 +*[http://​home.online.no/​~pjacklam/​notes/​invnorm/​index.html An algorithm for computing the inverse normal cumulative distribution function]
 +*[http://​home.online.no/​~pjacklam/​notes/​invnorm/​impl/​karimov/​StatUtil.java One of the Java implementations]
 +*[http://​nlp.cs.byu.edu/​trac/​NIST/​browser/​HEAD/​Language-ID/​scripts/​detware/​bin/​plot.c DETware'​s ppndf function]
 +*[http://​nlp.cs.byu.edu/​trac/​NIST/​browser/​HEAD/​Language-ID/​src/​edu/​byu/​langid/​metric/​NormalDeviate.java Robbie'​s adaptation of the DETware implementation]
 +[[Category:​Spoken Language ID]]
nlp-private/detware.txt ยท Last modified: 2015/04/22 15:09 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0