Generalized linear regression on sampled signals and curves