
382
Chapter
20
ing sumO and
sum1
by the prior probability and/or cost before return-
ing the ratio of
sum1
to their sum.
double parzconf ( // Returns conf in alternative hypothesis
int nO , // N of samples in null hypoth collection
int n1 , // And alternative
double *h0 , // Null hypothesis samples
double *h1 , // And alternative
double sigma , // Scale parameter (0.02 to 0.05 best)
double observed // Observed value to be classified
)
{
}
Multiple Classes
int i ;
double d, sumO, sum1 ;
sumO =
1.e-30
; // Insurance against dividing by 0 later
for (i=0 ; i<n0 ; i++) {
d = (observed - h0[i]) / sigma ;
sumO += exp ( - d * d ) ;
}
sumO /= (double ...