QR vs LU factorisation

Vic Norton vic at norton.name
Tue Jul 1 10:18:28 CDT 2008


I just used the "inverse" problem as an svd example, Fredrik. I don't  
generally compute inverses.

Here is the kind of "noisy" data problem I am thinking of. Suppose  
you are interested in 50 equity "funds" and you have 50 vectors of 39  
successive 13-week returns. Then you can compute 50 expected returns  
(assuming some kind of weighting, perhaps uniform, of the individual  
returns) and 50 vectors of deviations from these expected returns.  
Think of the deviation vectors as the risks of the individual funds.  
Your problem: express expected return as a linear function of risk.

For this problem you want to solve

    e' * R = E

for the 39 x 1 expected return vector e, where R is the 39 x 50 risk  
matrix and E is the 1 x 50 matrix of expected returns. None of your  
data, being ultimately based on dollars and cents prices per share,  
has even 6 digit accuracy. This is a problem where the svd approach  
with svdcut = 1e-6 would seem to be a natural choice. But you  
definitely would NOT compute the "pseudoinverse" of R to solve the  
problem.

Regards,

Vic

On Jul 1, 2008, at 4:41 AM, Fredrik Lingvall wrote:

> Vic Norton wrote:
>> On Jun 30, 2008, at 5:16 PM, Jaroslav Hajek wrote:
>>
>>
>>>> SVD is the best solution in this case. For example, to
>>>> invert a matrix A choose an svd "precision", say
>>>>
>>>>    svdcut = 1e-12;
>>>>
>>>> Then do
>>>>
>>>>    [U S V] = svd(A, 1);
>>>>    sig = diag(S);
>>>>    rnk = 0;
>>>>    for i = 1 : length(sig)
>>>>       if sig(i)/sig(1) < svdcut; break; endif
>>>>       rnk++;
>>>>    endfor
>>>>    Ainv = ( V(:, 1:rnk) * diag(1 ./ sig(1:rnk)) ) * U(:, 1:rnk)';
>>>>
>>>> to get the (pseudo)inverse of A.
>>>>
>>> or just use "pinv".
>>>
>>
>> What is the "precision" of "pinv"? If your data only is accurate  
>> to 6  digits, why try for anything more accurate than svdcut =  
>> 1e-7 would  produce? Any additional "accuracy" is pure noise.
>>
>>
>>
> What type of problem is this about? If it is parameter estimation  
> from noisy data then you can't really speak about an "inverse" but  
> you can formulate the problem as an inference problem (e.g., find  
> the most likely estimate given your data and background info (noise  
> variance etc.).
>
> /Fredrik
>



More information about the Help-octave mailing list