Estimates univariate function via Bayesian trend filtering