New method to identify symmetries in data using Bayesian statistics