Prediction of geomagnetic activity on time scales of one to ten years