Only in /net/cupido/home/tr/ai/tooldiag-1.4/doc: tooldiag-1.4.README
diff -r tooldiag/doc/tooldiag.doc /net/cupido/home/tr/ai/tooldiag-1.4/doc/tooldiag.doc
2,4c2,4
< %  		*********************************
< %  			TOOLDIAG vers. 1.4.1
< %  		*********************************
---
> %  		***************************
> %  			TOOLDIAG vers. 1.4
> %  		***************************
82,83d81
< (In order to avoid too much information, consider only the algorithm itself,
< not the context of the paper.)
347,349c345,348
<   VECTOR MEDIAN: The vector median of n multidimensional samples is the sample
<   with the minimum sum of Euclidean distances to the other samples.
< 
---
>   VECTOR MEDIAN: For each The distance (euclidean) is computed from every
>   multidimensional sample to the origin vector, this distances are sorted and
>   the corespondent sample of the median of the distances string is the median
>   of the distribution.
diff -r tooldiag/doc/version.doc /net/cupido/home/tr/ai/tooldiag-1.4/doc/version.doc
33,39d32
< !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
< Changes from version 1.4 to version 1.4.1
< 
<  - bugs:
<    1.) The nonlinear interclass distance feature selection was not inverted
<    2.) The definition of the VECTOR MEDIAN was not correctly defined
<    3.) Smaller compilation problems on a SUN were eliminated
diff -r tooldiag/src/b_and_b.c /net/cupido/home/tr/ai/tooldiag-1.4/src/b_and_b.c
25a26,27
> extern bool feat_description;
> extern char **feature_desc;
diff -r tooldiag/src/bf.c /net/cupido/home/tr/ai/tooldiag-1.4/src/bf.c
26a27,29
> extern bool feat_description;
> extern char **feature_desc;
> 
31d33
< 
32a35
> 
Only in /net/cupido/home/tr/ai/tooldiag-1.4/src: bincoeff-hannu.c
diff -r tooldiag/src/def.h /net/cupido/home/tr/ai/tooldiag-1.4/src/def.h
18,19c18
< /* extern char *malloc();	/**/
< /* use one of the two previous lines or substitute it by 
---
> /* exclude this line or substitute it by 
diff -r tooldiag/src/diagnos.c /net/cupido/home/tr/ai/tooldiag-1.4/src/diagnos.c
63a64
>  free_universe();
70,71d70
< 
<  selectFeaturesSFS( 3 );
85,86c84,85
<  printf(">>>>>              Universidade Nova de Lisboa &        <<<<<<\n");
<  printf(">>>>>          UNINOVA - Intelligent Robotics Center    <<<<<<\n");
---
>  printf(">>>>>              Universidade Nova de Lisboa          <<<<<<\n");
>  printf(">>>>>              Intelligent Robotics Group           <<<<<<\n");
diff -r tooldiag/src/featslct.c /net/cupido/home/tr/ai/tooldiag-1.4/src/featslct.c
71c71
< 	{ NONLINEAR,		"Nonlinear (Parzen & hyperspheric kernel)" }
---
> 	{ NONLINEAR,		"Nonlinear" }
304c304
<  gets(buf); done = FALSE;
---
>  gets(buf); done = FALSE; sscanf( buf, "%d", &strat );
307d306
<    case '\0' : break;
309c308
<    case 't': case 'T': featSelectToolsLoop(); break;
---
>    case 't': featSelectToolsLoop(); break;
311,318c310,316
<    default:
<      sscanf( buf, "%d", &strat );
<      if( strat >= 1 && strat <= num_search_strategies )
<      {
<        strategy = search_strategy[strat-1].index;
<        featSelect( strategy );
<      }
<      break;
---
>    default: if( strat >= 1 && strat <= num_search_strategies )
>             {
>               strategy = search_strategy[strat-1].index;
>               featSelect( strategy );
>               break;
>             };
>       showUniv( stdout ); break;
diff -r tooldiag/src/fstools.c /net/cupido/home/tr/ai/tooldiag-1.4/src/fstools.c
59c59
<  fprintf( f, "\n--- SELECTED FEATURES --- : %d\n", len );
---
>  fprintf( f, "\n--- SELECTED FEATURES --- : %d\n", U->nrSelFeat );
diff -r tooldiag/src/help.c /net/cupido/home/tr/ai/tooldiag-1.4/src/help.c
63c63
<          printf("\t2.) Transform each value x to (x-min)/(max-min).\n");
---
>          printf("\t2.) Transform each value x to (max-x)/(max-min).\n");
88c88
<          printf(" Do some statistics with the data.\n"); break;
---
>          printf(" Do some statistical stuff with the data.\n"); break;
diff -r tooldiag/src/intface.c /net/cupido/home/tr/ai/tooldiag-1.4/src/intface.c
33d32
< static char defNameTrain[] = "_train", defNameTest[] = "_test";
196a196
>  char defNameTrain[] = "_train", defNameTest[] = "_test";
312c312
<  printf("(1) Learning Vector Quantizer (LVQ)\n");
---
>  printf("(1) Linear Vector Quantizer (LVQ)\n");
diff -r tooldiag/src/lvq.c /net/cupido/home/tr/ai/tooldiag-1.4/src/lvq.c
317,321c317,318
<  rlen = RLEN_DEFAULT;
<  printf("Sammon: Number of iterations (default=%d): ", rlen );
<  gets(buf);
<  if( buf[0] != '\0' )
<    sscanf( buf, "%d", &rlen );
---
>  printf("Sammon: Number of iterations: ");
>  gets(buf); sscanf( buf, "%d", &rlen );
439c436
<  printf("\n>>>>>----- Learning Vector Quantizer (LVQ) -----<<<<<<\n");
---
>  printf("\n>>>>>----- Linear Vector Quantizer (LVQ) -----<<<<<<\n");
diff -r tooldiag/src/parzen.c /net/cupido/home/tr/ai/tooldiag-1.4/src/parzen.c
132,147d131
< 
< 
< float dist_NONLINEAR( vec1, vec2, len, class_i )
< FeatVector  vec1, vec2;
< int len, class_i;
< {
<  float dE, rho, invVol;
< 
<  dE =  dist_EUCLIDEAN( vec1, vec2, len );
<  rho = (float)hypersphere_kernel_param[len*U->nrClass + class_i].thresh;
<  invVol = (float)hypersphere_kernel_param[len*U->nrClass + class_i].inverseVol;
< 
<  if( dE <= rho ) return( invVol );
<  return( 0.0 );
< }
< 
diff -r tooldiag/src/qstar.c /net/cupido/home/tr/ai/tooldiag-1.4/src/qstar.c
55d54
< static ProType allPT = { NULL, FALSE, 0, NULL };
384,388c383,388
<  * This seems to be a quite new approach from Tampere University.
<  * The vector median of n multidimensional samples is the sample 
<  * with the minimum sum of Euclidean distances to the other samples. 
<  * So, for every sample one has to compute the sum of distances to 
<  * the other samples and then to choose the minimum. 
---
>  * This seems to be a quite new approach from
>  * Tampere University. The distance (euclidean) is computed from 
>  * every multidimensional sample to the origin vector, this 
>  * distances are sorted and the corespondent sample of the 
>  * median of the distances string is the median of the 
>  * distribution.
394,395c394,395
<  int k, i, j, nrf, minFriend;
<  FeatVector EuclidDistsSum = NULL;
---
>  int k, i, i1, i2, nrf;
>  FeatVector EuclidDistsSeq = NULL, EuclidDistsSeqSorted = NULL, origin = NULL;
397c397
<  float dist, minDist;
---
>  float dist, vecMedian, vecMedian1, vecMedian2;
406c406
<    printf("\n --- Only 1 friend: MEDIAN[%d] =", PT->friends[0] );
---
>    printf("\nMEDIAN[%d] =", PT->friends[0] );
413d412
<  /* Take the mean of the two friends */
420,421c419
<    printf("\n --- Only 2 friends: MEDIAN[%d,%d] =",
< 		 PT->friends[0], PT->friends[1] );
---
>    printf("\nMEDIAN[%d,%d] =", PT->friends[0], PT->friends[1] );
430,431c428,435
<  EuclidDistsSum = (FeatVector) malloc( nrf * sizeof( FeatVector* ) );
<  CHKPTR( EuclidDistsSum );
---
>  EuclidDistsSeq = (FeatVector) malloc( nrf * sizeof( FeatVector* ) );
>  CHKPTR( EuclidDistsSeq );
>  EuclidDistsSeqSorted = (FeatVector) malloc( nrf * sizeof( FeatVector* ) );
>  CHKPTR( EuclidDistsSeqSorted );
>  origin = (FeatVector) malloc( nrFeat * sizeof( FeatVector* ) );
>  CHKPTR( origin );
>  for( k = 0; k < nrFeat; k++ )
>    origin[k] = 0.0;
433,434c437,440
<  /* calculate the sum of all Euclidean distance for each friend from all
<     other friends */
---
>  odd = nrf % 2 == 1;
>  even = nrf % 2 == 0;
> 
>  /* calculate the Euclidean distance for each friend from the origin */
437,447c443,444
<    EuclidDistsSum[ i ] = 0.0;
<    for( j = 0; j < nrf; j++ )
<    {
<      if( i != j )
<      {
<        dist = Euclidian_Distance( &(Samples[nrFeat*PT->friends[i]]),
<                                   &(Samples[nrFeat*PT->friends[j]]), nrFeat );
<        /*printf("\tdist(%d,%d)=%f\n", PT->friends[i], PT->friends[j], dist);/**/
<        EuclidDistsSum[ i ] += dist;
<      }
<    }
---
>    dist=Euclidian_Distance( &(Samples[nrFeat*PT->friends[i]]), origin, nrFeat );
>    EuclidDistsSeq[ i ] = dist;
451c448
<      printf("Distance=%f  Sample=%d  ", EuclidDistsSum[ i ], PT->friends[i] );
---
>      printf("Distance=%f  Sample=%d  ", dist, PT->friends[i] );
456,458c453,459
<  /* determine the minimum sum of distances */
<  minDist = INFINITY;
<  for( i = 0; i < nrf; i++ )
---
>  /* showFV( nrf, EuclidDistsSeq ); /**/
>  copy_FV( EuclidDistsSeq, EuclidDistsSeqSorted, nrf );
>  qsort( EuclidDistsSeqSorted, nrf, sizeof(float), order_rule );
>  /* showFV( nrf, EuclidDistsSeqSorted ); DBG; /**/
> 
>  /* get the median from the distance array */
>  if( odd )
460c461,464
<    if( EuclidDistsSum[ i ] < minDist )
---
>    vecMedian = EuclidDistsSeqSorted[ (nrf-1)/2 ];
>    /* look for the index of the friend that had the medium distance */
>    found = FALSE; i = 0;
>    while( ! found && i < nrf )
462,463c466,468
<      minDist = EuclidDistsSum[ i ];
<      minFriend = i;
---
>      found = EuclidDistsSeq[i] == vecMedian;
>      if( ! found )
>        i++;
465,466c470,471
<  }
<  copy_FV( &(Samples[nrFeat*PT->friends[minFriend]]), median, nrFeat );
---
>    if( i >= nrf ) { fprintf(stderr,"Impossible index - exit...\n");exit(1); }
>    copy_FV( &(Samples[nrFeat*PT->friends[i]]), median, nrFeat );
468,472c473,478
<  if( nrf < PEEP_MED )
<  {
<    printf("VECTOR MEDIAN\n");
<    showFV( nrFeat, &(Samples[nrFeat*PT->friends[minFriend]]) ); /**/
<    printf("\n");
---
>    if( nrf < PEEP_MED )
>    {
>      showFV( nrf, EuclidDistsSeqSorted );
>      printf("MEDIAN[%d] =", PT->friends[i] ); showFV( nrFeat, median ); DBG;
>    }
> #endif
473a480,513
>  if( even )
>  {
>    vecMedian1 = EuclidDistsSeqSorted[ nrf/2 - 1 ];
>    vecMedian2 = EuclidDistsSeqSorted[ nrf/2 ];
>    /* search the two friends */
>    found = FALSE; i = 0;
>    while( ! found && i < nrf )
>    {
>      found = EuclidDistsSeq[i] == vecMedian1;
>      if( ! found )
>        i++;
>    }
>    if( i >= nrf ) { fprintf(stderr,"Impossible index - exit...\n");exit(1); }
>    i1 = i;
>    found = FALSE; i = 0;
>    while( ! found && i < nrf )
>    {
>      found = EuclidDistsSeq[i] == vecMedian2;
>      if( ! found )
>        i++;
>    }
>    if( i >= nrf ) { fprintf(stderr,"Impossible index - exit...\n");exit(1); }
>    i2 = i;
>    /* set the median the mean of the two friends */
>    for( k = 0; k < nrFeat; k++ )
>      median[k] = ( Samples[nrFeat*PT->friends[i1]+k] +
>              Samples[nrFeat*PT->friends[i2]+k] ) / 2.0;
> #ifdef PEEP_MED
>    if( nrf < PEEP_MED )
>    {
>      showFV( nrf, EuclidDistsSeqSorted );
>      printf("MEDIAN[%d,%d] =", PT->friends[i1], PT->friends[i2] );
>      showFV( nrFeat, median ); DBG;
>    }
475c515,516
<  FREE( EuclidDistsSum );
---
>  }
>  FREE( EuclidDistsSeq ); FREE( EuclidDistsSeqSorted ); FREE( origin );
717a759
>  ProType allPT = { NULL, FALSE, 0, NULL };
Only in /net/cupido/home/tr/ai/tooldiag-1.4/src: qstarOLD.c
diff -r tooldiag/src/sbs.c /net/cupido/home/tr/ai/tooldiag-1.4/src/sbs.c
26a27,29
> extern bool feat_description;
> extern char **feature_desc;
> 
30a34
> 
diff -r tooldiag/src/scatmats.c /net/cupido/home/tr/ai/tooldiag-1.4/src/scatmats.c
32c32
< #define xxxVERIFY
---
> #define VERIFY
diff -r tooldiag/src/scintcla.c /net/cupido/home/tr/ai/tooldiag-1.4/src/scintcla.c
54c54
< float dist_EUCLIDEAN( vec1, vec2, len )
---
> static float dist_EUCLIDEAN( vec1, vec2, len )
76c76
<  float dE, rho, invVol, Kernel, dist;
---
>  float dE, rho, invVol;
82,86c82,83
<  if( dE <= rho )
<    Kernel = invVol;
<  else
<    Kernel = 0.0;
<  return( Kernel );
---
>  if( dE <= rho ) return( invVol );
>  return( 0.0 );
173c170
<  float merit = 0.0, Jij, auxJij, auxJ, auxI, H, dummy=0.0;
---
>  float merit = 0.0, Jij, auxJij, auxJ, auxI, dummy=0.0;
212,216d208
<          if( dist == NONLINEAR )
<          {
<            H = (float)hypersphere_kernel_param[len*U->nrClass + i].inverseVol;
<            auxJij = H - auxJij;
<          }
diff -r tooldiag/src/sfs.c /net/cupido/home/tr/ai/tooldiag-1.4/src/sfs.c
26a27,29
> extern bool feat_description;
> extern char **feature_desc;
> 
diff -r tooldiag/src/util.c /net/cupido/home/tr/ai/tooldiag-1.4/src/util.c
240a241,248
> void get_d( d )
> int *d;
> { char buf[81];  buf[0]='\0'; gets(buf); sscanf(buf,"%d",d); }
> 
> void get_f( f )
> float *f;
> { char buf[81];  buf[0]='\0'; gets(buf); sscanf(buf,"%f",f); }
> 
282,306d289
< 
< void get_d( d )
< int *d;
< {
<  char buf[81]; 
< 
<  buf[0] = '\0'; gets(buf);
<  if( buf[0] == '\0' )
<    *d = EMPTY;
<  else
<    sscanf(buf,"%d",d);
< }
< 
< void get_f( f )
< float *f;
< {
<  char buf[81];
< 
<  buf[0]='\0'; gets(buf);
<  if( buf[0] == '\0' )
<    *f = (float)EMPTY;
<  else
<    sscanf(buf,"%f",f);
< }
< 
310d292
<  int old;
313d294
<  old = *d;
317,318d297
<    if( *d == EMPTY )
<      *d = old;
337d315
<  float old;
340d317
<  old = *f;
344,345d320
<    if( *f == (float)EMPTY )
<      *f = old;
