# Changeset 696 for trunk/yat/regression

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

added msd function in regression

Location:
trunk/yat/regression
Files:
2 edited

### Legend:

Unmodified
 r695 virtual void fit(const utility::vector& x, const utility::vector& y)=0; /** msd is defined as the mean of the squared residiuals \f$\frac{1}{N}\sum{(y_i-\hat{y}_i)^2} \f$, which is minimized when fitting the regression model. @return data values mean squeared deviation from the model */ inline double msd(void) const { return msd_; } /// /// @return expected value in @a x accrding to the fitted model
 r682 virtual ~OneDimensionalWeighted(void) {}; /// /// This function computes the best-fit given a model (see /// specific class for details) by minimizing \f$/// \sum{w_i(\hat{y_i}-y_i)^2} \f$, where \f$\hat{y} \f$ is the /// fitted value. The weight \f$w_i \f$ should be proportional /// to the inverse of the variance for \f$y_i \f$ /// /** This function computes the best-fit given a model (see specific class for details) by minimizing \f$\sum{w_i(\hat{y_i}-y_i)^2} \f$, where \f$\hat{y} \f$ is the fitted value. The weight \f$w_i \f$ should be proportional to the inverse of the variance for \f$y_i \f$ */ virtual void fit(const utility::vector& x, const utility::vector& y, const utility::vector& w)=0; virtual double prediction_error(const double x, const double w=1) const=0; /// /// @return error of model value in @a x /// /** The standard error is defined as \f$\sqrt{E(Y|x - \hat{y}(x))^2 }\f$ @return error of model value in @a x */ virtual double standard_error(const double x) const=0;