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. Within the Language-ID project it is located at 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.

Building

As of [revision #], building of DETware is handled by the CMake-based build system. Run

make

or

make detware

build it.

If you wish to build DETware manually, run the following commands within the Language-ID/scripts/detware/bin directory: :

gcc -Wall -std=c89 ./hd_dcf.c -o win/hd_dcf.exe<br/>

:

gcc -Wall -std=c89 ./plot.c -o win/plot.exe

Also:

  • 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 r123 log message for more details.

Output

This line of Ruby code invokes the plot executable:

system_dbg("${PLOT_EXE} #{output_dir}/TAR #{output_dir}/NON #{output_dir}/DET_nist")

Therefore the output files written by the plot executable are formulated in the following way:<br/>

tarfile: argv[1] -> TAR<br/>
nonfile: argv[2] -> NON<br/>
outfile: argv[3] -> DET_nist<br/>
bestfile: argv[3] + ".points" -> DET_nist.points

TAR (tarfile)

while (fscanf (tarfile, "%lf \n", tarptr) > 0)<br/>
tarptr++;

NON (nonfile)

while (fscanf (nonfile, "%lf \n", nonptr) > 0)<br/>
nonptr++;

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/>

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]);

Note that Pdet is a pointer to the same array as pts. pts is thus populated as follows:<br/> When npts == 0:<br/>

Pdet[npts][0] = ppndf (PMIN);<br/>
Pdet[npts][1] = ppndf (PMAX);<br/>
Pdet[npts][2] = PMIN;<br/>
Pdet[npts][3] = PMAX;

When npts != 0:<br/>

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]);

DET_nist.points (bestfile)

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]);

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 OpenFormula draft for detailed information on implementations of particular functions.

normdist

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

norminv

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