Density estimation via hybrid splines