Replica Validation code made more usable by writing a function to estimate the analytic error, taking as input the form of the regularizer