airoldilab / sgd

An R package for large scale estimation with stochastic gradient descent
60 stars 18 forks source link

Non-huber loss for m-estimator [feature request] #98

Closed karldw closed 5 years ago

karldw commented 7 years ago

Currently, the documentation says "huber" is the default loss for m-estimators, but in the code snippet below, it looks like it's actually the only option:

 else if (model == "m") {
    control.loss <-  model.control$loss
    if (is.null(control.loss)) {
      control.loss <- "huber"
    } else if (control.loss != "huber") {
      stop ("'loss' not available")
    }

It would be great if other options were available, including user-supplied functions! (Edit: saw issue #31)

Also, as a side note, the code control.loss != "huber" errors out when you try to provide a function, rather than reaching the "'loss' not available" message.

karldw commented 5 years ago

Closing this; there's no new info in my request that isn't already in #31