Building a geological model is important in resource estimation, as it defines the extent of domains for estimation. Geological models are built by assigning a domain to the samples, based on logging of different features related to lithology, alteration, and mineralization. Then, the extent of these domains is determined using geometric or geostatistical tools. However, these models should account for uncertainty, since the actual extent of these domains is not known and must be extrapolated from the labelled samples. With the availability of geochemical datasets and machine learning techniques, employing multiple variables to build resource models should be considered. This article proposes a two-step machine learning approach with an ensemble implementation to define geological domains and their uncertainties. First, an unsupervised binary clustering method labels the geochemical samples into two domains. These labelled samples are used to inform a geological domain model built by support vector classification. This application is repeated with subsets of variables and subsets of samples, leading to an ensemble learning method. Weak models are produced with each subset of samples and variables, and combined to devise a stronger learner. The final model accounts for uncertainties thanks to the ensemble implementation. The proposed workflow is demonstrated on a dataset from a porphyry copper deposit, applied hierarchically to define four domains. Performance is comparable with traditional methods, but provides the advantage of allowing domain knowledge in the selection of the variables, and generates domain boundaries that can be controlled in terms of their continuity and smoothness.