MIN Cleanup logperplexity function