isgd.RdThis optimizer performs an implicit stochastic gradient descent
algorithm. It is mainly used within a bamlss call.
For function boost() the x list, as returned from
function bamlss.frame, holding all model matrices
and other information that is used for fitting the model.
The model response, as returned from function
bamlss.frame.
A bamlss family object, see
family.bamlss.
Prior weights on the data, as returned from function bamlss.frame.
Can be used to supply model offsets for use in fitting,
returned from function bamlss.frame.
Function specifying the step length.
Should the data be shuffled?
Hessian approximating function.
Vector of starting values.
Added to gammaFUN().
tpf
For function opt_isgd() a list containing the following objects:
A named list of the fitted values based on the last iteration of the modeled parameters of the selected distribution.
A matrix, each row corresponds to the parameter values of one iteration.
The summary of the stochastic gradient descent algorithm which can be printed and plotted.
Toulis, P and Airoldi, EM (2015): Scalable estimation strategies based on stochastic approximations: Classical results and new insights. Statistics and Computing, 25, no. 4, 781--795. doi: 10.1007/s11222-015-9560-y
Motivated by the lecture 'Regression modelling with large data sets' given by Ioannis Kosmidis in Innsbruck, January 2017.
CAUTION: Arguments weights and offset are not implemented yet!
if (FALSE) {
set.seed(111)
d <- GAMart(n = 10000)
f <- num ~ s(x1) + s(x2) + s(x3) + te(lon, lat)
b <- bamlss(f, data = d, optimizer = opt_isgd, sampler = FALSE)
plot(b, ask = F)
## loop over observations a 2nd time
b <- bamlss(f, data = d, optimizer = opt_isgd, sampler = FALSE, start = parameters(b),
i.state = b$model.stats$optimizer$sgd.summary$i.state)
plot(b, ask = F)
## try differeent gammaFuns, e.g.,
# gammaFun <- function(i) .3/sqrt((1+i)) + 0.001
## testing some families
f2 <- bin ~ s(x1) + s(x2) + s(x3) + te(lon, lat)
b2 <- bamlss(f2, data = d, optimizer = opt_isgd, sampler = FALSE, family = "binomial")
f3 <- cens ~ s(x1) + s(x2) + s(x3) + te(lon, lat)
b3 <- bamlss(f3, data = d, optimizer = opt_isgd, sampler = FALSE, family = "cnorm")
}