English

Fast generalised linear models by database sampling and one-step polishing

Computation 2018-03-15 v1

Abstract

In this note, I show how to fit a generalised linear model to NN observations on pp variables stored in a relational database, using one sampling query and one aggregation queries, as long as N12+δN^{\frac{1}{2}+\delta} observations can be stored in memory. The resulting estimator is fully efficient and asymptotically equivalent to the maximum likelihood estimator, and so its variance can be estimated from the Fisher information in the usual way. A proof-of-concept implementation uses R with MonetDB and with SQLite, and could easily be adapted to other popular databases. I illustrate the approach with examples of taxi-trip data in New York City and factors related to car colour in New Zealand.

Keywords

Cite

@article{arxiv.1803.05165,
  title  = {Fast generalised linear models by database sampling and one-step polishing},
  author = {Thomas Lumley},
  journal= {arXiv preprint arXiv:1803.05165},
  year   = {2018}
}
R2 v1 2026-06-23T00:52:35.520Z