Coupling unsupervised segmentation in wells with automatic implicit modeling in a Bayesian framework