Changeset 916 for trunk/test/knn_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/knn_test.cc

    r903 r916  
    44#include "yat/classifier/MatrixLookupWeighted.h"
    55#include "yat/statistics/euclidean_vector_distance.h"
     6#include "yat/statistics/pearson_vector_distance.h"
    67#include "yat/utility/matrix.h"
    78
     
    4243  utility::matrix weights(data.rows(),data.columns(),0.0);
    4344  utility::nan(data,weights);
    44      
     45
    4546  classifier::MatrixLookupWeighted dataviewweighted(data,weights);
    46   classifier::KNN<statistics::euclidean_vector_distance_tag> knn(dataviewweighted,targets);
     47  classifier::KNN<statistics::pearson_vector_distance_tag> knn(dataviewweighted,targets);
     48  *error << "Training KNN" << std::endl;
    4749  knn.train();
    4850 
Note: See TracChangeset for help on using the changeset viewer.