Implement simple importance sampling with an appropriate proposal distribution to estimate the partition functions individually. Since we know the ratio of two partition functions, we can use it as a reference point to normalize the estimated probabilities. This approach has the advantage of not requiring additional training data but may have higher computational costs due to Monte Carlo simulations.