# Changeset 713 for trunk/yat/regression/Naive.h

Ignore:
Timestamp:
Dec 21, 2006, 3:43:31 PM (16 years ago)
Message:

Fixes #77, #78, #158, and #163, and refs #81

File:
1 edited

### Legend:

Unmodified
 r703 namespace regression { /// /// @bief naive fitting. /// /// @todo document /// /** @brief Naive Regression Data are modeled as \f$y_i = \alpha + \epsilon_i \f$ */ class Naive : public OneDimensional { virtual ~Naive(void); /** \f$\frac{1}{N-1} \sum (x_i-m)^2 \f$ @brief Mean Squared Error */ double chisq(void) const; /// /// This function computes the best-fit for the naive model \f$y /// = m \f$ from vectors \a x and \a y, by minimizing \f$/// \sum{(y_i-m)^2} \f$. This function is the same as using the /// weighted version with unity weights. /// \sum{(y_i-m)^2} \f$. /// void fit(const utility::vector& x, const utility::vector& y); /// /// @brief Mean Squared Error /// inline double mse(void) const { return mse_; } /// /// Function predicting value using the naive model. /// The predicted value is the average \f$ m \f\$ /// double predict(const double x) const; /// /// @return standard error /// /// @see statistics::Averager /// double standard_error(const double x) const;