# Changeset 718 for trunk/yat/regression

Ignore:
Timestamp:
Dec 26, 2006, 10:56:26 AM (17 years ago)
Message:

Location:
trunk/yat/regression
Files:
16 edited

Unmodified
Removed
• ## trunk/yat/regression/Linear.cc

 r713 { } double Linear::alpha(void) const { return alpha_; } double Linear::alpha_err(void) const { return sqrt(alpha_var_); } double Linear::beta(void) const { return beta_; } double Linear::beta_err(void) const { return sqrt(beta_var_); } double Linear::chisq(void) const return chisq_; } void Linear::fit(const utility::vector& x, const utility::vector& y) } double Linear::r2(void) const { return r2_; } double Linear::standard_error(const double x) const {

• ## trunk/yat/regression/Local.cc

 r703 Local::~Local(void) { } void Local::add(const double x, const double y) { data_.push_back(std::make_pair(x,y)); } } const utility::vector& Local::x(void) const { return x_; } const utility::vector& Local::y_predicted(void) const { return y_predicted_; } const utility::vector& Local::y_err(void) const { return y_err_; } std::ostream& operator<<(std::ostream& os, const Local& r) {
• ## trunk/yat/regression/Local.h

 r703 /// adding a data point /// inline void add(const double x, const double y) { data_.push_back(std::make_pair(x,y)); } void add(const double x, const double y); /// /// Function returning predicted values /// inline const utility::vector& y_predicted(void) const { return y_predicted_; } /// /// Function returning error of predictions /// inline const utility::vector& y_err(void) const { return y_err_; } /// /// @param nof_points Number of points used in each fit /// @return x-values where fitting was performed. /// inline const utility::vector& x(void) const { return x_; } const utility::vector& x(void) const; /// /// Function returning predicted values /// const utility::vector& y_predicted(void) const; /// /// Function returning error of predictions /// const utility::vector& y_err(void) const; private:
• ## trunk/yat/regression/MultiDimensional.cc

 r713 double MultiDimensional::predict(const utility::vector& x) const { return fit_parameters_ * x; } double MultiDimensional::prediction_error(const utility::vector& x) const {
• ## trunk/yat/regression/MultiDimensional.h

 r713 /// @return value in @a x according to fitted model /// inline double predict(const utility::vector& x) const { return fit_parameters_ * x; } double predict(const utility::vector& x) const; ///
• ## trunk/yat/regression/MultiDimensionalWeighted.cc

 r703 } double MultiDimensionalWeighted::predict(const utility::vector& x) const { return fit_parameters_ * x; } double MultiDimensionalWeighted::prediction_error(const utility::vector& x, const double w) const
• ## trunk/yat/regression/MultiDimensionalWeighted.h

 r703 /// @return value in @a x according to fitted model /// inline double predict(const utility::vector& x) const { return fit_parameters_ * x; } double predict(const utility::vector& x) const; ///
• ## trunk/yat/regression/NaiveWeighted.cc

 r703 } double NaiveWeighted::predict(const double x) const { return ap_.y_averager().mean(); } double NaiveWeighted::mse(void) const { return ap_.y_averager().std(); } double NaiveWeighted::standard_error(const double x) const { return ap_.y_averager().standard_error(); } }}} // of namespaces regression, yat, and theplu
• ## trunk/yat/regression/NaiveWeighted.h

 r703 /// weighted average. /// inline double predict(const double x) const { return ap_.y_averager().mean(); } double predict(const double x) const; /// /// @see AveragerWeighted /// inline double mse(void) const { return ap_.y_averager().std(); } double mse(void) const; /// /// @return estimation of error of model value in @a x /// inline double standard_error(const double x) const { return ap_.y_averager().standard_error(); } double standard_error(const double x) const; private:
• ## trunk/yat/regression/OneDimensional.cc

 r713 } double OneDimensional::r_squared(void) const { return chisq()/variance(); } double OneDimensional::variance(void) const { return ap_.y_averager().variance(); } }}} // of namespaces regression, yat, and theplu
• ## trunk/yat/regression/OneDimensional.h

 r713 fraction of the variance explained by the regression model. */ inline double r_squared(void) const { return chisq()/variance(); } double r_squared(void) const; /** /// Variance of y /// inline double variance(void) const { return ap_.y_averager().variance(); } double variance(void) const; ///
• ## trunk/yat/regression/PolynomialWeighted.cc

 r703 } double PolynomialWeighted::mse(void) const { return mse_; } double PolynomialWeighted::predict(const double x) const {
• ## trunk/yat/regression/PolynomialWeighted.h

 r703 /// /// @todo /// @brief Mean Squared Error /// inline double mse(void) const { return mse_; } double mse(void) const; ///
Note: See TracChangeset for help on using the changeset viewer.