We present an approach for the stabilization of an unknown nonlinear dynamical system when only data samples from its dynamics are available. Our approach is based on approximating the system dynamics with an ensemble of regression trees. As a result of our approximation, we obtain a model that is a piecewise-affine dynamical system defined over a partition of the state space. In general, the stabilization of the resulting piece-wise affine system requires, in the worst case, solving an exponential number of linear matrix inequalities (with respect to the state dimension). To overcome this computational limitation, we propose a stabilization procedure having a complexity that grows linearly with the number of partitions. This stabilization procedure explicitly exploits the fact that our model is described via an ensemble of regression trees. In addition, we derive probabilistic conditions under which the stabilization of the model implies that the original nonlinear system is also stabilized. Finally, we validate our approach by performing numerical simulations over trajectories of two coupled Van der Pol oscillators.