Machine learning has shown great potential in various domains, but its appearance in inventory control optimization settings remains rather limited. We propose a novel inventory cost minimization framework that exploits advanced decision-tree based models to approximate inventory performance at an item level, considering demand patterns and key replenishment policy parameters as input. The suggested approach enables data-driven approximations that are faster to perform compared to standard inventory simulations, while being flexible in terms of the methods used for forecasting demand or estimating inventory level, lost sales, and number of orders, among others. Moreover, such approximations can be based on knowledge extracted from different sets of items than the ones being optimized, thus providing more accurate proposals in cases where historical data are scarce or highly affected by stock-outs. The framework was evaluated using part of the M5 competition’s data. Our results suggest that the proposed framework, and especially its transfer learning variant, can result in significant improvements, both in terms of total inventory cost and realized service level.