Patches item #3139291, was opened at 2010-12-17 15:13
Message generated for change (Comment added) made by shlagbaum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3139291&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Slava Mazur (shlagbaum) Assigned to: Nobody/Anonymous (nobody) Summary: Enhancement to linear least squares regression Initial Comment: The idea behind proposed enhancement is application of the current linear least squares regression to a wider range of containers. Currently the input data must be in std::vector<double>. However, in my particular case for example, i need to perform linear least squares on the data in boost::circular_buffer<double> and it is highly undesirable to create vector copies of the original data just to satisfy rather rigid requirements of the current linear least squares design. A proposed patch relaxes such a requirement and at the same time preserves backward compatibility. A correspondent test case is added to the test_suite. ---------------------------------------------------------------------- Comment By: Slava Mazur (shlagbaum) Date: 2010-12-20 13:13 Message: I agree, but the reason for the proposed design was the current design of the LinearRegression class, which handles both 1d and multi-dimensional regressions. In addition to generalize wrt input data type, my goal was to optimize the existing solution, since currently LinearRegression class treats a one-dimensional regression as being a multi-dimensional one, which introduces although small, but an overhead in 1d case. Such an overhead may become significant if LinearRegression is used repeatedly in a loop. If the LinearRegression class were a template instead, things would be much simpler, but this would break the backward compatibility. ---------------------------------------------------------------------- Comment By: Klaus Spanderen (klausspanderen) Date: 2010-12-18 11:22 Message: Enhancing the flexibilty of the class LinearLeastSquaresRegression is a good idea. Just a design question: instead of adding more classes would it be better for the "end user" to stay with one LinearLeastSquaresRegression class but add two "templatized" constructors to this class? These constructors would allow e.g. boost::circular_buffer<double> to be used as input parameters. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3139291&group_id=12740 ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |