Changeset 718 for trunk/yat/regression/LinearWeighted.cc
 Timestamp:
 Dec 26, 2006, 10:56:26 AM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/regression/LinearWeighted.cc
r703 r718 42 42 } 43 43 44 double LinearWeighted::alpha(void) const 45 { 46 return alpha_; 47 } 48 49 double LinearWeighted::alpha_err(void) const 50 { 51 return sqrt(alpha_var_); 52 } 53 54 double LinearWeighted::beta(void) const 55 { 56 return beta_; 57 } 58 59 double LinearWeighted::beta_err(void) const 60 { 61 return sqrt(beta_var_); 62 } 63 44 64 void LinearWeighted::fit(const utility::vector& x, 45 65 const utility::vector& y, … … 64 84 } 65 85 86 double LinearWeighted::m_x(void) const 87 { 88 return ap_.x_averager().mean(); 89 } 90 91 double LinearWeighted::m_y(void) const 92 { 93 return ap_.y_averager().mean(); 94 } 95 96 double LinearWeighted::mse(void) const 97 { 98 return mse_; 99 } 100 101 double LinearWeighted::prediction_error(const double x, const double w) const 102 { 103 return sqrt(alpha_var_ + beta_var_*(xm_x_)*(xm_x_)+s2(w)); 104 } 105 106 double LinearWeighted::s2(double w) const 107 { 108 return s2_/w; 109 } 110 111 double LinearWeighted::standard_error(const double x) const 112 { 113 return sqrt(alpha_var_ + beta_var_*(xm_x_)*(xm_x_) ); 114 } 115 116 double LinearWeighted::sxx(void) const 117 { 118 return ap_.x_averager().sum_xx_centered(); 119 } 120 121 double LinearWeighted::sxy(void) const 122 { 123 return ap_.sum_xy_centered(); 124 } 125 126 double LinearWeighted::syy(void) const 127 { 128 return ap_.y_averager().sum_xx_centered(); 129 } 130 66 131 }}} // of namespaces regression, yat, and theplu
Note: See TracChangeset
for help on using the changeset viewer.