Changeset 1437 for trunk/yat/regression/Local.cc
 Timestamp:
 Aug 25, 2008, 7:55:00 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/regression/Local.cc
r1275 r1437 6 6 Copyright (C) 2008 Peter Johansson 7 7 8 This file is part of the yat library, http:// trac.thep.lu.se/yat8 This file is part of the yat library, http://dev.thep.lu.se/yat 9 9 10 10 The yat library is free software; you can redistribute it and/or … … 69 69 70 70 size_t nof_fits=data_.size()/step_size; 71 x_ = utility::Vector(nof_fits);72 y_predicted_ = utility::Vector(x_.size());73 y_err_ = utility::Vector(x_.size());71 x_.resize(nof_fits); 72 y_predicted_.resize(x_.size()); 73 y_err_.resize(x_.size()); 74 74 sort(data_.begin(), data_.end()); 75 75 76 // co ying data to 2 utility vectors ONCE to use views from76 // copying data to 2 utility vectors ONCE to use views from 77 77 utility::Vector x(data_.size()); 78 78 utility::Vector y(data_.size()); … … 124 124 assert(i<y_predicted_.size()); 125 125 assert(i<y_err_.size()); 126 x_(i) = x(i*step_size); 126 127 y_predicted_(i) = regressor_>predict(x(i*step_size)); 127 128 y_err_(i) = sqrt(regressor_>standard_error2(x(i*step_size)));
Note: See TracChangeset
for help on using the changeset viewer.