Ignore:
Timestamp:
Feb 1, 2008, 4:34:30 PM (14 years ago)
Author:
Markus Ringnér
Message:

Adding functionality tests for NCC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/NCC.h

    r1007 r1013  
    215215      }
    216216    }
    217     trained_=true;
    218     return trained_;
     217    return true;
    219218  }
    220219
     
    223222                              utility::matrix& prediction) const
    224223  {   
    225     utility::yat_assert<std::runtime_error>(data_.rows()==test.rows());
    226     utility::yat_assert<std::runtime_error>(test.rows()==centroids_->rows());
     224    utility::yat_assert<std::runtime_error>
     225      (centroids_,"NCC::predict called for untrained classifier");
     226    utility::yat_assert<std::runtime_error>
     227      (data_.rows()==test.rows(),
     228       "NCC::predict test data with incorrect number of rows");
    227229   
    228230    prediction.clone(utility::matrix(centroids_->columns(), test.columns()));       
Note: See TracChangeset for help on using the changeset viewer.