danielwilhelm / R-CS-ranks

R package implementing confidence sets for ranks
https://danielwilhelm.github.io/R-CS-ranks/
GNU General Public License v3.0
5 stars 1 forks source link

Optimize fitting projection models #33

Closed MrDomani closed 1 year ago

MrDomani commented 1 year ago

In vcov we are fitting a lot of linear models based on very similar data, calling lm p times (p-number of columns). Maybe we could do it more optimally. Need to think, read, and think more.

MrDomani commented 1 year ago

I found a way to calculate coefficients of projection models directly from the original lmranks object, in a much more efficient way than fitting p linear models. I am working also on optimizing code s.t. it uses more matrix multiplications and less loops (sapply's) with inner products within.

danielwilhelm commented 1 year ago

Great! And you are testing the modifications to make sure that the results stay the same?

Sent from Proton Mail for iOS

On Sat, Jun 24, 2023 at 17:58, Pawel Morgen @.***(mailto:On Sat, Jun 24, 2023 at 17:58, Pawel Morgen < wrote:

I found a way to calculate coefficients of projection models directly from the original lmranks object, in a much more efficient way that fitting p linear models. I am working also on optimizing code s.t. it uses more matrix multiplications and less loops (sapply's) with inner products within.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

MrDomani commented 1 year ago

Of course. Right now all the changes are on a local branch on my computer; when ready & tested, I will push them to dev branch and make a pull request to master.