Changeset 4078 for trunk/yat/regression/Linear.h
 Timestamp:
 Aug 26, 2021, 8:52:34 AM (19 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/regression/Linear.h
r2202 r4078 36 36 37 37 /** 38 @brief linear regression. 39 38 @brief linear regression. 39 40 40 Data are modeled as \f$ y_i = \alpha + \beta (x_im_x) + 41 41 \epsilon_i \f$. 42 42 */ 43 class Linear : public OneDimensional 43 class Linear : public OneDimensional 44 44 { 45 45 46 46 public: 47 47 /// … … 51 51 52 52 /// 53 /// @brief The destructor 53 /// @brief The destructor 54 54 /// 55 55 virtual ~Linear(void); 56 56 57 57 /** 58 58 The parameter \f$ \alpha \f$ is estimated as \f$ 59 59 \frac{1}{n}\sum y_i \f$ 60 60 61 61 @return the parameter \f$ \alpha \f$ 62 62 */ … … 66 66 The variance is estimated as \f$ \frac{s^2}{n} 67 67 \f$ where \f$ s^2 = \frac{\sum \epsilon^2}{n2} \f$ 68 68 69 69 @return variance of parameter \f$ \alpha \f$ 70 70 */ … … 74 74 The parameter \f$ \beta \f$ is estimated as \f$ 75 75 \frac{\textrm{Cov}(x,y)}{\textrm{Var}(x)} \f$ 76 76 77 77 @return the parameter \f$ \beta \f$ 78 78 */ … … 93 93 */ 94 94 void fit(const utility::VectorBase& x, const utility::VectorBase& y) ; 95 95 96 96 /// 97 /// @return \f$ \alpha + \beta x \f$ 97 /// @return \f$ \alpha + \beta x \f$ 98 98 /// 99 99 double predict(const double x) const; … … 109 109 The error of the model is estimated as \f$ 110 110 \textrm{alpha\_err}^2+\textrm{beta\_err}^2*(xm_x)*(xm_x)\f$ 111 111 112 112 @return estimated error of model in @a x 113 113 */
Note: See TracChangeset
for help on using the changeset viewer.