Changeset 1021
 Timestamp:
 Feb 1, 2008, 6:58:38 PM (15 years ago)
 Location:
 trunk/yat/regression
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/regression/MultiDimensional.cc
r1009 r1021 26 26 #include "yat/utility/Exception.h" 27 27 #include "yat/utility/matrix.h" 28 #include "yat/utility/VectorBase.h" 28 29 #include "yat/utility/vector.h" 29 30 … … 54 55 55 56 56 void MultiDimensional::fit(const utility::matrix& x, const utility::vector& y) 57 void MultiDimensional::fit(const utility::matrix& x, 58 const utility::VectorBase& y) 57 59 { 58 60 assert(x.rows()==y.size()); … … 86 88 87 89 88 double MultiDimensional::predict(const utility:: vector& x) const90 double MultiDimensional::predict(const utility::VectorBase& x) const 89 91 { 90 92 assert(x.size()==fit_parameters_.size()); … … 93 95 94 96 95 double MultiDimensional::prediction_error2(const utility:: vector& x) const97 double MultiDimensional::prediction_error2(const utility::VectorBase& x) const 96 98 { 97 99 return standard_error2(x) + s2_; … … 99 101 100 102 101 double MultiDimensional::standard_error2(const utility:: vector& x) const103 double MultiDimensional::standard_error2(const utility::VectorBase& x) const 102 104 { 103 105 double s2 = 0; 
trunk/yat/regression/MultiDimensional.h
r1000 r1021 26 26 27 27 #include "yat/utility/matrix.h" 28 #include "yat/utility/ vector.h"28 #include "yat/utility/VectorBase.h" 29 29 30 30 #include <gsl/gsl_multifit.h> … … 64 64 dimension errors). 65 65 */ 66 void fit(const utility::matrix& X, const utility:: vector& y);66 void fit(const utility::matrix& X, const utility::VectorBase& y); 67 67 68 68 /// … … 79 79 /// @return value in @a x according to fitted model 80 80 /// 81 double predict(const utility:: vector& x) const;81 double predict(const utility::VectorBase& x) const; 82 82 83 83 /// … … 85 85 /// in @a x 86 86 /// 87 double prediction_error2(const utility:: vector& x) const;87 double prediction_error2(const utility::VectorBase& x) const; 88 88 89 89 /// 90 90 /// @return squared error of model value in @a x 91 91 /// 92 double standard_error2(const utility:: vector& x) const;92 double standard_error2(const utility::VectorBase& x) const; 93 93 94 94 private:
Note: See TracChangeset
for help on using the changeset viewer.