An empirical method for the optimal setting of the potential fields inverse problem