View source: R/make_glm_streaming_fn.r
make_glm_streaming_fn | R Documentation |
Define a function that can be used to feed data into speedglm and biglm
make_glm_streaming_fn(data, verbose = FALSE)
data |
a disk.frame |
verbose |
Whether to print the status of data loading. Default to FALSE |
return a function, fn, that can be used as the data argument in biglm::bigglm or speedglm::shglm
Other Machine Learning (ML):
dfglm()
cars.df = as.disk.frame(cars) streamacq = make_glm_streaming_fn(cars.df, verbose = FALSE) majorv = as.integer(version$major) minorv = as.integer(strsplit(version$minor, ".", fixed=TRUE)[[1]][1]) if(((majorv == 3) & (minorv >= 6)) | (majorv > 3)) { m = biglm::bigglm(dist ~ speed, data = streamacq) summary(m) predict(m, get_chunk(cars.df, 1)) predict(m, collect(cars.df, 1)) } else { m = speedglm::shglm(dist ~ speed, data = streamacq) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.