Results 1 to 2 of 2

Thread: Pseudo-inverse vs. MULTIREGRESS

  1. #1
    Senior Member
    Join Date
    Oct 2008
    Posts
    187

    Pseudo-inverse vs. MULTIREGRESS

    I recently benchmarked multi-linear regression on a large dataset using two methods in PV-WAVE -- direct manipulation of the matrix using the pseudo-inverse vs. the MULTIREGRESS function. Surprisingly, the pseudo-inverse was much faster. Is this because the pseudo-inverse leverages OpenMP but MULTIREGRESS does not? I am using 64-bit PV-WAVE 10.0a on Windows 7 and my PC has 4 cores with 8 threads.

    Code:
    FUNCTION matrix_invert, matr
      LUFAC, matr, CONDITION=A_c, INVERSE=m_inv
    END
    
    ; Load result and train matrices
    info, result, train
    regr = result # TRANSPOSE(train) # MATRIX_INVERT(train # TRANSPOSE(train))
    
    ; Transpose the train matrix
    info, result, train
    regr = MULTIREGRESS(train, result)
    Here are the results:

    Code:
    Pseudo-Inverse:
    RESULT          FLOAT     = Array(84210624)
    TRAIN           FLOAT     = Array(7, 84210624)
    Elapsed time = 12.277 sec
    
    MULTIREGRESS:
    RESULT          FLOAT     = Array(84210624)
    TRAIN           FLOAT     = Array(84210624, 7)
    Elapsed time = 39.063 sec
    Last edited by hcrisp; 03-20-2015 at 01:54 PM. Reason: spelling

  2. #2
    Grand Poobah donb's Avatar
    Join Date
    Aug 2005
    Location
    Colorado
    Posts
    147
    Yes, that's very likely the case. The OpenMP performance improvements, especially when used with the Automatic Thread Control tuning, are quite impressive!!

    There has been no such turning efforts applied to the PV-WAVE Advantage routines.

    Don B.
    Don Boughey
    PV-WAVE Advocate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •