An efficient gradient-based parameter estimation algorithm using representer expansions