forum.alglib.net

ALGLIB forum
It is currently Sat Apr 20, 2024 5:08 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Non-negative Least Square Problem using lsfitlinearc()
PostPosted: Fri Nov 25, 2011 4:13 pm 
Offline

Joined: Fri Nov 25, 2011 3:54 pm
Posts: 1
Hi, everyone! I'm new to Alglib.
I'm trying to solve a non-negative linear least square problem:

The aim is to solve:
A*X = B. (A is an n*n matrix, B is a vector with n elements, X stores the solutions).
subject to (1) 0<= X(i) <= 1 (2) Sum X(i) = 1; ( X(i) is the i-th element in X).


I'm trying to use the function lsfitlinearc(real_1d_array y,real_2d_array fmatrix, real_2d_array cmatrix,ae_int_t& info,real_1d_array& c,lsfitreport& rep);
But I have some questions about it.
(1) Could anyone tell me the correspondance between fmatrix and my matrix A? I mean, the required input fmatrix and my matrix A in A*X=B. Because I don't quite understand the examples given on the webpage about the function.
(2) In lsfitlinearc(), there's no constraint about boundaries. So can I use lsfitsetbc() to set the boundaires before I call lsfitlinearc()? I tried adding lsfitsetbc() in the example code for lsfitlinearc(), but the results didn't change with boundary constraints. I guess the two functions are independent of each other. Right?

Thanks a lot for your answers!!


Top
 Profile  
 
 Post subject: Re: Non-negative Least Square Problem using lsfitlinearc()
PostPosted: Tue Apr 03, 2012 9:11 pm 
Offline

Joined: Tue Apr 03, 2012 9:04 pm
Posts: 7
Hello, have you managed to resolve this issue? I am also trying to run lsfitsetbc for least square calculation on a matrix and I am having similar problem. It would be great if you could post a working code. hugo


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 76 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group