In many application fields, huge binary datasets modeling real life-phenomena are daily produced. The dataset records are usually associated with observations of some events, and people are often interested in mining these datasets in order to recognize recurrent patterns. However, the discovery of the most important patterns is very challenging. For example, these patterns may overlap, or be related only to a particular subset of the observations. Finally, the mining can be hindered by the presence of noise. In this paper, we introduce a generative pattern model, and an associated cost model for evaluating the goodness of the set of patterns extracted from a binary dataset. We propose an efficient algorithm, named GPM, for the discovery of the patterns being most important according to the model. We show that the proposed model generalizes other approaches and supports the discovery of higher quality patterns.