Changeset 695 for trunk/yat/regression/OneDimensional.h
- Timestamp:
- Oct 25, 2006, 11:20:17 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/regression/OneDimensional.h
r682 r695 55 55 virtual ~OneDimensional(void) {}; 56 56 57 / //58 ///This function computes the best-fit given a model (see59 ///specific class for details) by minimizing \f$60 ///\sum{(\hat{y_i}-y_i)^2} \f$, where \f$ \hat{y} \f$ is the fitted value.61 ///57 /** 58 This function computes the best-fit given a model (see 59 specific class for details) by minimizing \f$ 60 \sum{(\hat{y_i}-y_i)^2} \f$, where \f$ \hat{y} \f$ is the fitted value. 61 */ 62 62 virtual void fit(const utility::vector& x, const utility::vector& y)=0; 63 63 64 64 /// 65 /// function predicting in one point65 /// @return expected value in @a x accrding to the fitted model 66 66 /// 67 67 virtual double predict(const double x) const=0; 68 68 69 /// 70 /// @return expected prediction error for a new data point in @a x 71 /// 69 /** 70 The prediction error is defined as the square root of the 71 expected squared deviation a new data point will have from 72 value the model provides. The expected squared deviation is 73 defined as \f$ E(Y|x - \hat{y}(x))^2 \f$ and is typically 74 divided into two terms \f$ E(Y|x - E(Y|x))^2 \f$ and \f$ 75 E(E(Y|x) - \hat{y}(x))^2 \f$, which is the conditional variance 76 in \f$ x \f$ and the squared standard error (see 77 standard_error()) of the model estimation in \f$ x \f$, 78 respectively. 79 80 @return expected prediction error for a new data point in @a x 81 */ 72 82 virtual double prediction_error(const double x) const=0; 73 83 74 84 /// 75 /// @brief print output to @a os 85 /// @brief print output to ostream @a os 86 /// 87 /// Printing estimated model to @a os in the points defined by @a 88 /// min, @a max, and @a n. The values printed for each point is 89 /// the x-value, the estimated y-value, and the estimated standard 90 /// deviation of a new data poiunt will have from the y-value 91 /// given the x-value (see prediction_error()). 92 /// 93 /// @param n number of points printed 94 /// @param min smallest x-value for which the model is printed 95 /// @param max largest x-value for which the model is printed 76 96 /// 77 97 std::ostream& print(std::ostream& os,const double min, 78 98 double max, const u_int n) const; 79 99 80 /// 81 /// @return error of model value in @a x 82 /// 100 /** 101 The standard error is defined as \f$ \sqrt{E(Y|x - 102 \hat{y}(x))^2 }\f$ 103 104 @return error of model value in @a x 105 */ 83 106 virtual double standard_error(const double x) const=0; 84 107
Note: See TracChangeset
for help on using the changeset viewer.