Ignore:
Timestamp:
Oct 15, 2008, 9:42:36 PM (13 years ago)
Author:
Peter
Message:

refs #396 - fixing feature_selector_test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/feature_selection_test.cc

    r1487 r1584  
    3232
    3333#include "yat/utility/Matrix.h"
     34#include "yat/utility/MatrixWeighted.h"
    3435
    3536#include <algorithm>
     
    6263  suite.err() << "... done" << std::endl;
    6364
    64   // Generate weight matrix with 0 for missing values and 1 for others.
    65   utility::Matrix weights(data.rows(),data.columns(),0.0);
    66   for(size_t i=0;i<data.rows();++i)
    67     for(size_t j=0;j<data.columns();++j)
    68       if(!std::isnan(data(i,j)))
    69         weights(i,j)=1.0;
    70  
    71   classifier::MatrixLookupWeighted dataviewweighted(data,weights);
     65  // Generate matrix with weight 0 for missing values and 1 for others.
     66  utility::MatrixWeighted xw(data);
     67  classifier::MatrixLookupWeighted dataviewweighted(xw);
    7268 
    7369  f2.update(dataviewweighted,targets);
Note: See TracChangeset for help on using the changeset viewer.