- Where Developers Learn, Share, & Build Careers


I used to work with MATLAB, and for the question I raised, I p = polyfit (x, y, 1) To estimate the best fit line for scatter data in the plate I can use, I was wondering which resources I can rely on to implement line fitting algorithm with C ++. I think there are so many algorithms for this topic, and for me, I hope the algorithm should be fast and during this time it can achieve comparative accuracy of the polyphonic function in MATLAB.

I suggest coding it from scratch. This is a very simple implementation in C ++. You can code sources directly from your data for intercept and gradients (both code as polyfit ) for at least classes

These forms close formulas, which you can easily use the loop. If you were using high degree then I would recommend a matrix library or a more sophisticated algorithm, but for simple linear regression, as you say above it requires you to have matrix and linear algebraic routine such problem (my opinion In) will end.


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -