Changeset 858 for trunk/yat


Ignore:
Timestamp:
Sep 7, 2007, 1:32:34 AM (14 years ago)
Author:
Peter
Message:

refs #148 in EnsembleBuilder?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/EnsembleBuilder.cc

    r831 r858  
    9292   
    9393    utility::matrix prediction; 
    94     try {
    95       const KernelLookup& kernel = dynamic_cast<const KernelLookup&>(data);
     94    const KernelLookup* kernel = dynamic_cast<const KernelLookup*>(&data);
     95    if (kernel) {
    9696      for(u_long k=0;k<subset_->size();k++) {
    97         KernelLookup kernel_peter(kernel,subset_->training_index(k),true);
    98         classifier(k).predict(kernel_peter,prediction);
     97        KernelLookup sub_kernel(*kernel,subset_->training_index(k),true);
     98        classifier(k).predict(sub_kernel,prediction);
    9999
    100100        for(size_t i=0; i<prediction.rows();i++)
     
    103103      }
    104104    }
    105     catch (std::bad_cast) {
     105    else {
    106106      for(u_long k=0;k<subset_->size();k++) {
    107107        classifier(k).predict(data,prediction);
Note: See TracChangeset for help on using the changeset viewer.