-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance tuning for mlm
#1
Comments
In a run with ~4000 obs and 7 covariates, it takes ~ 30 secs to run |
Thanks for the info, @josherrickson. Looking inside the definition of that
|
The speed issues aren't as bad as I originally thought. Turns out when subsetting an optmatch object such as
is properly dropping any blank levels, but is not similarly truncating the
For some context,
The relative slowdowns I mentioned in my first comment still exist. I'll crosspost this to the appropriate issue in optmatch 96. |
Thanks, @josherrickson . This prompted a couple of issues on the optmatch side, the most pertinent being optmatch #107. Inside of # list of positions of treatment member(s), then
# control group members; by matched set
pos.tc <- lapply( levels(from), function(lev) c(which(from==lev & zz),
which(from==lev & !zz))) with pos.tc <- order(from, zz) and some subsequent adjustments for the fact that |
283e156 addresses 2. from Ben's first comment above; in the test code I included in the commit, |
Great call on the |
@josherrickson reports that
mlm
is pretty slow (on a problem with 30K or so matched sets and 70K or so matched observations). I suspect thesapply
call, but maybe I'm all wet - the first step should be profiling. If thesapply
calls are slow, I suggest replacing them with sparse matrix ops, perhaps making use ofSparseMMFromFactor
as defined in the RItools clusters branch.The text was updated successfully, but these errors were encountered: