Privacy-preserving data sharing via probabilistic modelling