Data-Driven Methods and Applications for Optimization under Uncertainty and Rare-Event Simulation