  Many applications in Lattice field theory require to determine the Taylor
series of observables with respect to action parameters. A primary example is
the determination of electromagnetic corrections to hadronic processes. We show
two possible solutions to this general problem, one based on reweigting, that
can be considered a generalization of the RM123 method. The other based on the
ideas of Numerical Stochastic Perturbation Theory (NSPT) in the Hamiltonian
formulation. We show that 1) the NSPT-based approach shows a much reduced
variance in the determination of the Taylor coefficients, and 2) That both
approaches are related by a change of variables. Numerical results are shown
for the case of $\lambda-\phi^4$ in 4 dimensions, but we expect these
observations to be general. We conclude by commenting on the possible use of
Machine Learning techniques to find similar change of variables that can
potentially reduce the variance in Taylor coefficients.
