forum.alglib.net
http://forum.alglib.net/

Given matrix X and vector y can ALGLIB find w such that Xw?y
http://forum.alglib.net/viewtopic.php?f=2&t=558
Page 1 of 1

Author:  hugolove [ Wed Apr 04, 2012 5:33 am ]
Post subject:  Given matrix X and vector y can ALGLIB find w such that Xw?y

Hello, how would one use ALGLIB to calculate following:

Given a matrix X and a vector y of appropriate dimensions, find a vector w such that Xw?y?

Moreover, is it possible, at the same time, to make sure every entry in Xw is less that some other
number?

If ALGLIB is able to calculate it, how would one implement it?
Any help is greatly appreciated.
hugo

Author:  hugolove [ Thu Apr 05, 2012 8:25 am ]
Post subject:  Re: Given matrix X and vector y can ALGLIB find w such that

Hello, I have found an answer on MATLAB forum.

using MATLAB you would do:

given Matrix X = rand(10,5);
given vector y = rand(10,1);
someOtherGivenNumber = 1.3; (can be different)

opts = optimset(optimset('lsqlin'),'LargeScale','off');
w = lsqlin(X,y,[-X; X] , [-y; 0*y+someOtherGivenNumber],[],[],[],[],[],opts)

Well, is this possible to perform in ALGLIB? And how exactly would you do it?
Moreover, can someOtherGivenNumber be set for every Xw?

Is there a solution?
hugo

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/