R/stream-methods.R
predict.fastglm_stream.RdPrediction for a large dataset can create a vector too large to retain in memory. A sink is a user-supplied function that receives one block of results at a time, for example to write predictions to a file or accumulate a summary. Without a sink, the result blocks are collected into a single R object, whose memory requirement grows with the number of observations.
a streaming GLM fit.
optional prediction data; otherwise rereads the fitted source.
prediction arguments as in [predict.fastglm()].
optional function of `(value, chunk_index)` that processes or writes each result block. Its return value is ignored.
additional prediction arguments.
Predictions (a `fastglm_prediction` list when `se.fit=TRUE`), or invisibly the number of chunks delivered to a sink. Each prediction block supplied to a sink uses the same structure. See fastglm-prediction-methods.