bounded memory linear and generalized linear models