Scenario trees and policy selection for multistage stochastic programming using machine learning