Changeset 1164 for trunk/yat/classifier


Ignore:
Timestamp:
Feb 26, 2008, 7:36:52 PM (16 years ago)
Author:
Markus Ringnér
Message:

Refs. #318

Location:
trunk/yat/classifier
Files:
2 edited

Legend:

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

    r1162 r1164  
    126126
    127127    Distance distance_;
    128 
    129128    NeighborWeighting weighting_;
    130129
     
    214213  KNN<Distance, NeighborWeighting>::make_classifier() const
    215214  {     
    216     KNN* knn=new KNN<Distance, NeighborWeighting>();
     215    // All private members should be copied here to generate an
     216    // identical but untrained classifier
     217    KNN* knn=new KNN<Distance, NeighborWeighting>(distance_);
     218    knn->weighting_=this->weighting_;
    217219    knn->k(this->k());
    218220    return knn;
  • trunk/yat/classifier/NCC.h

    r1162 r1164  
    159159  NCC<Distance>::make_classifier() const
    160160  {     
    161     return new NCC<Distance>();
     161    // All private members should be copied here to generate an
     162    // identical but untrained classifier
     163    return new NCC<Distance>(distance_);
    162164  }
    163165
Note: See TracChangeset for help on using the changeset viewer.