Changeset 925 for trunk/test


Ignore:
Timestamp:
Oct 2, 2007, 4:02:08 PM (16 years ago)
Author:
Markus Ringnér
Message:

NCC and IGP have been changed to templates on Distance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/ncc_test.cc

    r916 r925  
    2828#include "yat/classifier/Target.h"
    2929#include "yat/utility/matrix.h"
    30 #include "yat/statistics/vector_distance_ptr.h"
    3130#include "yat/statistics/pearson_vector_distance.h"
    3231#include "yat/utility/utility.h"
     
    6059  vec[3]="bjds";
    6160  classifier::Target target(vec);
    62   statistics::vector_distance_lookup_weighted_ptr dist=
    63     statistics::vector_distance<statistics::pearson_vector_distance_tag>;
    64   classifier::NCC ncctmp(ml,target,dist);
     61  classifier::NCC<statistics::pearson_vector_distance_tag> ncctmp(ml,target);
    6562  *error << "training...\n";
    6663  ncctmp.train();
     
    7976     
    8077  classifier::MatrixLookupWeighted dataviewweighted(data,weights);
    81   statistics::vector_distance_lookup_weighted_ptr distance=
    82     statistics::vector_distance<statistics::pearson_vector_distance_tag>;
    83   classifier::NCC ncc(dataviewweighted,targets,distance);
     78  classifier::NCC<statistics::pearson_vector_distance_tag> ncc(dataviewweighted,targets);
    8479  *error << "training...\n";
    8580  ncc.train();
     
    147142  if(ok)
    148143    return 0;
    149   return -1;
    150  
     144  return -1; 
    151145}
Note: See TracChangeset for help on using the changeset viewer.