Generalization error bounds for stationary autoregressive models