Changeset 901


Ignore:
Timestamp:
Sep 27, 2007, 11:00:05 AM (14 years ago)
Author:
Markus Ringnér
Message:

Added a template KNN classifier where the distance measure is the template. Refs #250 and #182

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Makefile.am

    r889 r901  
    3232  distance_test \
    3333  ensemble_test feature_selection_test fileutil_test inputranker_test \
    34   iterator_test kernel_test kernel_lookup_test matrix_test matrix_lookup_test \
     34  iterator_test kernel_test kernel_lookup_test knn_test matrix_test matrix_lookup_test  \
    3535  nbc_test \
    3636  ncc_test nni_test pca_test regression_test rnd_test roc_test \
     
    6060kernel_test_SOURCES = kernel_test.cc
    6161kernel_lookup_test_SOURCES = kernel_lookup_test.cc
     62knn_test_SOURCES = knn_test.cc 
    6263matrix_test_SOURCES = matrix_test.cc
    6364matrix_lookup_test_SOURCES = matrix_lookup_test.cc
  • trunk/test/ncc_test.cc

    r898 r901  
    6666  // Generate weight matrix with 0 for missing values and 1 for others.
    6767  utility::matrix weights(data.rows(),data.columns(),0.0);
    68   for(size_t i=0;i<data.rows();++i)
    69     for(size_t j=0;j<data.columns();++j)
    70       if(!std::isnan(data(i,j)))
    71         weights(i,j)=1.0;
     68  utility::nan(data,weights);
    7269     
    7370  classifier::MatrixLookupWeighted dataviewweighted(data,weights);
  • trunk/test/vector_distance_test.cc

    r900 r901  
    1313#include <iostream>
    1414#include <list>
    15 #include <string>
    1615#include <vector>
    1716
  • trunk/yat/classifier/Makefile.am

    r865 r901  
    8080  Kernel_MEV.h \
    8181  Kernel_SEV.h \
     82  KNN.h \
    8283  MatrixLookup.h \
    8384  MatrixLookupWeighted.h \
Note: See TracChangeset for help on using the changeset viewer.