Prediction and Regulation by Linear Least-Square Methods