# Changeset 4078 for trunk/yat/regression/Linear.h

Ignore:
Timestamp:
Aug 26, 2021, 8:52:34 AM (19 months ago)
Message:

remove trailing ws

File:
1 edited

### Legend:

Unmodified
 r2202 /** @brief linear regression. @brief linear regression. Data are modeled as \f$y_i = \alpha + \beta (x_i-m_x) + \epsilon_i \f$. */ class Linear : public OneDimensional class Linear : public OneDimensional { public: /// /// /// @brief The destructor /// @brief The destructor /// virtual ~Linear(void); /** The parameter \f$\alpha \f$ is estimated as \f$\frac{1}{n}\sum y_i \f$ @return the parameter \f$\alpha \f$ */ The variance is estimated as \f$\frac{s^2}{n} \f$ where \f$s^2 = \frac{\sum \epsilon^2}{n-2} \f$ @return variance of parameter \f$\alpha \f$ */ The parameter \f$\beta \f$ is estimated as \f$\frac{\textrm{Cov}(x,y)}{\textrm{Var}(x)} \f$ @return the parameter \f$\beta \f$ */ */ void fit(const utility::VectorBase& x, const utility::VectorBase& y) ; /// /// @return \f$\alpha + \beta x \f$ /// @return \f$\alpha + \beta x \f$ /// double predict(const double x) const; The error of the model is estimated as \f$\textrm{alpha\_err}^2+\textrm{beta\_err}^2*(x-m_x)*(x-m_x)\f$ @return estimated error of model in @a x */