Changeset 916 for trunk/test/ncc_test.cc


Ignore:
Timestamp:
Sep 30, 2007, 2:50:10 AM (16 years ago)
Author:
Peter
Message:

Sorry this commit is a bit to big.

Adding a yat_assert. The yat assert are turned on by providing a
'-DYAT_DEBUG' flag to preprocessor if normal cassert is turned
on. This flag is activated for developers running configure with
--enable-debug. The motivation is that we can use these yat_asserts in
header files and the yat_asserts will be invisible to the normal user
also if he uses C-asserts.

added output operator in DataLookup2D and removed output operator in
MatrixLookup?

Removed template function add_values in Averager and weighted version

Added function to AveragerWeighted? taking iterator to four ranges.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/ncc_test.cc

    r901 r916  
    5656  bool ok = true;
    5757
     58  classifier::MatrixLookupWeighted ml(4,4);
     59  std::vector<std::string> vec(4, "pos");
     60  vec[3]="bjds";
     61  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);
     65  *error << "training...\n";
     66  ncctmp.train();
     67 
    5868  std::ifstream is("data/sorlie_centroid_data.txt");
    5969  utility::matrix data(is,'\t');
     
    7282    statistics::vector_distance<statistics::pearson_vector_distance_tag>;
    7383  classifier::NCC ncc(dataviewweighted,targets,distance);
     84  *error << "training...\n";
    7485  ncc.train();
    7586
     
    103114  }
    104115
     116  *error << "prediction...\n";
    105117  utility::matrix prediction;
    106118  ncc.predict(dataviewweighted,prediction);
Note: See TracChangeset for help on using the changeset viewer.