Changeset 696 for trunk/yat/regression


Ignore:
Timestamp:
Oct 25, 2006, 12:13:37 PM (15 years ago)
Author:
Peter
Message:

added msd function in regression

Location:
trunk/yat/regression
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/regression/OneDimensional.h

    r695 r696  
    6262    virtual void fit(const utility::vector& x, const utility::vector& y)=0;
    6363   
     64    /**
     65       msd is defined as the mean of the squared residiuals \f$
     66       \frac{1}{N}\sum{(y_i-\hat{y}_i)^2} \f$, which is minimized when
     67       fitting the regression model.
     68
     69       @return data values mean squeared deviation from the model
     70    */
     71    inline double msd(void) const { return msd_; }
     72
    6473    ///
    6574    /// @return expected value in @a x accrding to the fitted model
  • trunk/yat/regression/OneDimensionalWeighted.h

    r682 r696  
    5454    virtual ~OneDimensionalWeighted(void) {};
    5555         
    56     ///
    57     /// This function computes the best-fit given a model (see
    58     /// specific class for details) by minimizing \f$
    59     /// \sum{w_i(\hat{y_i}-y_i)^2} \f$, where \f$ \hat{y} \f$ is the
    60     /// fitted value. The weight \f$ w_i \f$ should be proportional
    61     /// to the inverse of the variance for \f$ y_i \f$
    62     ///
     56    /**
     57      This function computes the best-fit given a model (see
     58      specific class for details) by minimizing \f$
     59      \sum{w_i(\hat{y_i}-y_i)^2} \f$, where \f$ \hat{y} \f$ is the
     60      fitted value. The weight \f$ w_i \f$ should be proportional
     61      to the inverse of the variance for \f$ y_i \f$
     62    */
    6363    virtual void fit(const utility::vector& x, const utility::vector& y,
    6464                     const utility::vector& w)=0;
     
    7575    virtual double prediction_error(const double x, const double w=1) const=0;
    7676
    77     ///
    78     /// @return error of model value in @a x
    79     ///
     77    /**
     78       The standard error is defined as \f$ \sqrt{E(Y|x -
     79       \hat{y}(x))^2 }\f$
     80
     81       @return error of model value in @a x
     82    */
    8083    virtual double standard_error(const double x) const=0;
    8184
Note: See TracChangeset for help on using the changeset viewer.