Ideas from machine learning and operations research and management science (OR MS) can be combined in developing a framework, along with specific methods, for using data to prescribe optimal decisions in OR MS problems. In a departure from other work on data-driven optimization data is considered consisting, not only of observations of quantities with direct effect on costs revenues, such as demand or returns, but predominantly of observations of associated auxiliary quantities. The main problem of interest is a conditional stochastic optimization problem, given imperfect observations, where the joint probability distributions that specify the problem are unknown. It’s demonstrated that the proposed solution methods, inspired by ML methods such as local regression LOESS , classiÞcation and regression trees CART , and random forests RF , are generally applicable to a wide range of decision problems. It’s proven that they are computationally tractable and asymptotically optimal under mild conditions even when data is not independent and identically distributed and even for censored observations. These results are extended to the case where some of the decision variables can directly affect uncertainty in unknown ways, such as pricing effect on demand in joint pricing and planning problems. As an analogue to the coecient of determination R2, a metric P is developed termed the coecient of prescriptiveness to measure the prescriptive content of data and the ecacy of a policy from an operations perspective. To demonstrate the power of the approach in a real-world setting  an inventory management problem is studied faced by the distribution arm of an international media conglomerate, which ships an average of  billion units per year.