sgd icon indicating copy to clipboard operation
sgd copied to clipboard

Flags for constructing design matrix is ignored

Open lantian2012 opened this issue 9 years ago • 4 comments

  • [ ] subset: a subset of data points; can be a parameter in sgd.control
  • [ ] na.action: how to deal when data has NA; can be a parameter in sgd.control
  • [ ] model: logical value determining whether to output the X data frame
  • [ ] x,y: logical value determining whether to output the x and/or y
  • [ ] contrasts: a list for performing hypothesis testing on other sets of predictors; can be a paramter in sgd.control
  • [ ] weights
  • [ ] offset

lantian2012 avatar May 09 '15 19:05 lantian2012

I plan to add the default value to na.action, subset in valid_model_control(). However, i'll need to call valid_model_control() in sgd.formula. So valid_model_control() will be called twice. I think the redundancy is acceptable. na.action and subset will be shared by all models, so we may also add them as arguments in sgd.formula. But I think that would make sgd.formula look too complex. Do you think we need na.action and subset for sgd.matrix?

lantian2012 avatar May 09 '15 20:05 lantian2012

as long as there are reasonable defaults, it would make sense to include those.

ptoulis avatar May 09 '15 20:05 ptoulis

It also makes sense to profile the code and see how long running the validity check takes On May 9, 2015 4:22 PM, "Panos Toulis" [email protected] wrote:

as long as there are reasonable defaults, it would make sense to include those.

— Reply to this email directly or view it on GitHub https://github.com/airoldilab/sgd/issues/48#issuecomment-100541105.

dustinvtran avatar May 09 '15 22:05 dustinvtran

I haven't formally profiled the code. But I once ran the code with validity checks commented out. There's no significant improvement in performance.

lantian2012 avatar May 09 '15 22:05 lantian2012