Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Least square solution #53

Open
paulhayes opened this issue Feb 5, 2014 · 6 comments
Open

Least square solution #53

paulhayes opened this issue Feb 5, 2014 · 6 comments

Comments

@paulhayes
Copy link

I wasn't sure where else to post this question. It's not technically a bug but more a missing feature.

I'm porting some code I originally wrote in python/numpy, into javascript/numeric.

I'm finding numeric very good so far, but I know need to find the least square solution for a non square matrix. In numpy this is achieved with numpy.linalg.lstsq, but there's no direct equivalent I could find in numeric.

Could you possibly offer me a short way of achieving this using numeric? I'm aware I can write my own least square solver, but as it's a common problem I thought maybe there's a way that I hadn't noticed by reading through the documentation.

Thank you for taking the time to help me.

@reptillicus
Copy link

I'm intersted in this as well. I'm going to take a stab at a general
Levenburg-Marquardt solver one of these days, haven't had the time or brain
function lately. If anyone else is interested let me know.

On Wed, Feb 5, 2014 at 6:37 AM, Paul Hayes notifications@github.com wrote:

I wasn't sure where else to post this question. It's not technically a bug
but more a missing feature.

I'm porting some code I originally wrote in python/numpy, into
javascript/numeric.

I'm finding numeric very good so far, but I know need to find the least
square solution for a non square matrix. In numpy this is achieved with
numpy.linalg.lstsq, but there's no direct equivalent I could find in
numeric.

Could you possibly offer me a short way of achieving this using numeric?
I'm aware I can write my own least square solver, but as it's a common
problem I thought maybe there's a way that I hadn't noticed by reading
through the documentation.

Thank you for taking the time to help me.

Reply to this email directly or view it on GitHubhttps://github.com//issues/53
.

@Ravenwater
Copy link

+1
On 2/5/2014 11:57 AM, Joe Meiring wrote:

I'm intersted in this as well. I'm going to take a stab at a general
Levenburg-Marquardt solver one of these days, haven't had the time or
brain
function lately. If anyone else is interested let me know.

On Wed, Feb 5, 2014 at 6:37 AM, Paul Hayes notifications@github.com
wrote:

I wasn't sure where else to post this question. It's not technically
a bug
but more a missing feature.

I'm porting some code I originally wrote in python/numpy, into
javascript/numeric.

I'm finding numeric very good so far, but I know need to find the least
square solution for a non square matrix. In numpy this is achieved with
numpy.linalg.lstsq, but there's no direct equivalent I could find in
numeric.

Could you possibly offer me a short way of achieving this using numeric?
I'm aware I can write my own least square solver, but as it's a common
problem I thought maybe there's a way that I hadn't noticed by reading
through the documentation.

Thank you for taking the time to help me.

Reply to this email directly or view it on
GitHubhttps://github.com//issues/53
.


Reply to this email directly or view it on GitHub
#53 (comment).

@sebleedelisle
Copy link

+1

@paulhayes
Copy link
Author

Hi again,
I've written a least square solver that should be easy to integrate into the numeric library. Sorry for not forking the project, and doing a pull request, but I've run out of time to spend on this.

https://gist.github.com/paulhayes/8888586

I've tested it, and it does work. Promise!

@reptillicus
Copy link

Finally got around to this, here's a demo page:
http://josephmeiring.github.io/jsfit/

and here is the repo:
http://josephmeiring.github.io/jsfit/

Its working pretty good for me, let me know if you are using it or if you find some bugs.

@paulhayes
Copy link
Author

Hi @josephmeiring did you realise you posted the github.io page twice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants