Changeset 1043 for trunk/yat/regression


Ignore:
Timestamp:
Feb 6, 2008, 8:30:03 PM (13 years ago)
Author:
Peter
Message:

fixing #128 - iterators in Averger classes

Location:
trunk/yat/regression
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/regression/LinearWeighted.cc

    r1020 r1043  
    7575    // want.
    7676    ap_.reset();
    77     ap_.add_values(x,y,utility::vector(x.size(),1),w);
     77    yat::utility::vector dummy(x.size(), 1.0);
     78    add(ap_, x.begin(), x.end(), y.begin(),dummy.begin(),w.begin());
    7879
    7980    alpha_ = m_y();
  • trunk/yat/regression/NaiveWeighted.cc

    r1020 r1043  
    5151    assert(y.size()==w.size());
    5252    ap_.reset();
    53     ap_.add_values(x,y,utility::vector(x.size(),1.0), w);
     53    utility::vector dummy(x.size(),1.0);
     54    add(ap_, x.begin(), x.end(), y.begin(),dummy.begin(), w.begin());
    5455    chisq_ = ap_.y_averager().sum_xx_centered();
    5556  }
  • trunk/yat/regression/Polynomial.cc

    r1019 r1043  
    5252                       const utility::VectorBase& y)
    5353  {
    54     ap_.add_values(x,y);
     54    add(ap_, x.begin(), x.end(), y.begin());
    5555    utility::matrix X=utility::matrix(x.size(),power_+1,1);
    5656    for (size_t i=0; i<X.rows(); ++i)
  • trunk/yat/regression/PolynomialWeighted.cc

    r1020 r1043  
    5252    // product wx*wy, so we can send in w and a dummie to get what we
    5353    // want.
    54     ap_.add_values(x,y,utility::vector(x.size(),1),w);
     54    utility::vector dummy(x.size(), 1.0);
     55    add(ap_,x.begin(), x.end(),y.begin(),dummy.begin(),w.begin());
    5556    utility::matrix X=utility::matrix(x.size(),power_+1,1);
    5657    for (size_t i=0; i<X.rows(); ++i)
Note: See TracChangeset for help on using the changeset viewer.