Data-Driven Estimation of Conditional Expectations, Application to Optimal Stopping and Reinforcement Learning