A Unified Approach to Inferring Chemical Compounds with the Desired Aqueous Solubility