Changeset 1022


Ignore:
Timestamp:
Feb 1, 2008, 7:01:47 PM (14 years ago)
Author:
Peter
Message:

passing VectorBase? in regression::MultiDimesionalWeighted? - refs #256

Location:
trunk/yat/regression
Files:
2 edited

Legend:

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

    r1009 r1022  
    5252
    5353  void MultiDimensionalWeighted::fit(const utility::matrix& x,
    54                                      const utility::vector& y,
    55                                      const utility::vector& w)
     54                                     const utility::VectorBase& y,
     55                                     const utility::VectorBase& w)
    5656  {
    5757    assert(y.size()==w.size());
     
    8686
    8787
    88   double MultiDimensionalWeighted::predict(const utility::vector& x) const
     88  double MultiDimensionalWeighted::predict(const utility::VectorBase& x) const
    8989  {
    9090    assert(x.size()==fit_parameters_.size());
     
    9393
    9494
    95   double MultiDimensionalWeighted::prediction_error2(const utility::vector& x,
     95  double MultiDimensionalWeighted::prediction_error2(const utility::VectorBase& x,
    9696                                                     const double w) const
    9797  {
     
    107107
    108108  double
    109   MultiDimensionalWeighted::standard_error2(const utility::vector& x) const
     109  MultiDimensionalWeighted::standard_error2(const utility::VectorBase& x) const
    110110  {
    111111    double c = 0;
  • trunk/yat/regression/MultiDimensionalWeighted.h

    r1000 r1022  
    6363       dimension errors).
    6464    */
    65     void fit(const utility::matrix& X, const utility::vector& y,
    66              const utility::vector& w);
     65    void fit(const utility::matrix& X, const utility::VectorBase& y,
     66             const utility::VectorBase& w);
    6767
    6868    ///
    6969    /// @return value in @a x according to fitted model
    7070    ///
    71     double predict(const utility::vector& x) const;
     71    double predict(const utility::VectorBase& x) const;
    7272
    7373    ///
     
    7575    /// in @a x
    7676    ///
    77     double prediction_error2(const utility::vector& x, const double w=1) const;
     77    double prediction_error2(const utility::VectorBase& x, const double w=1) const;
    7878
    7979    ///
    8080    /// @return error of model value in @a x
    8181    ///
    82     double standard_error2(const utility::vector& x) const;
     82    double standard_error2(const utility::VectorBase& x) const;
    8383
    8484    ///
Note: See TracChangeset for help on using the changeset viewer.