Skip to main content

Petro-Elastic Log-Facies Classification Using the Expectation–Maximization Algorithm and Hidden Markov Models


Log-facies classification methods aim to estimate a profile of facies at the well location based on the values of rock properties measured or computed in well-log analysis. Statistical methods generally provide the most likely classification of lithological facies along the borehole by maximizing a function that describes the likelihood of a set of rock samples belonging to a certain facies. However, most of the available methods classify each sample in the well log independently and do not account for the vertical distribution of the facies profile. In this work, a classification method based on hidden Markov models is proposed, a stochastic method that accounts for the probability of transitions from one facies to another one. Differently from other available methods where the model parameters are assessed using nearby fields or analogs, the unknown parameters are estimated using a statistical algorithm called the Expectation–Maximization algorithm. The method is applied to two different datasets: a clastic reservoir in the North Sea where four litho-fluid facies are identified and an unconventional reservoir in North America where four lithological facies are defined. The results of the applications show the added value of the introduction of a vertical continuity model in the facies classification and the ability of the proposed method of inferring model parameters such as facies transition probabilities and facies posterior distributions. The application also includes a sensitivity analysis and a comparison to other statistical methods.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15


  • Avseth P, Mukerji T, Mavko G (2005) Quantitative seismic interpretation. Cambridge University Press, Cambridge

    Book  Google Scholar 

  • Baum LE, Petrie T, Soules G, Weiss N (1970) A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains. Ann Math Stat 41(3):164–171

    Article  Google Scholar 

  • Boggs SJ (2013) Principles of sedimentology and stratigraphy, 5th edn. Pearson Education Limited, London

    Google Scholar 

  • Chen C, Hiscott RN (1999) Statistical analysis of facies clustering in submarine-fan turbidite successions. J Sediment Res 69(2):505–517

    Article  Google Scholar 

  • Darling T (2005) Well logging and formation evaluation. Elsevier, Amsterdam

    Google Scholar 

  • Da Veiga S, Le Ravalec M (2012) Maximum likelihood classification for facies inference from reservoir attributes. Comput Geosci 16(3):709–722

    Article  Google Scholar 

  • Dempster AP, Laird NM, Rubin DB (1977) Maximum likelihood from incomplete data via the EM algorithm. J R Stat Soc Ser B 39:1–38

    Google Scholar 

  • Dubois MK, Bohling GC, Chakrabarti S (2007) Comparison of four approaches to a rock facies classification problem. Comput Geosci 33(5):599–617

    Article  Google Scholar 

  • Dymarski P (ed) (2011) Hidden Markov models. Theory and applications. InTech

  • Eidsvik J, Mukerji T, Switzer P (2004) Estimation of geological attributes from a well log: an application of hidden Markov chains. Math Geol 36(3):379–397

    Article  Google Scholar 

  • Elfeki A, Dekking M (2001) Markov chain model for subsurface characterization: theory and applications. Math Geol 33(5):569–589

    Article  Google Scholar 

  • Ellis DV, Singer JM (2007) Well logging for earth scientists. Springer, New York

    Book  Google Scholar 

  • Fan L, Poh KL (2007) A comparative study of PCA, ICA and class-conditional ICA for naive Bayes classifier. Computational and ambient intelligence. Springer, Berlin Heidelberg, pp 16–22

  • Fylling A (2002) Quantification of petrophysical uncertainty and its effect on in-place volume estimates: numerous challenges and some solutions. In: SPE Annual Technical Conference and Exhibition, San Antonio, Texas. SPE

  • Grana D, Della Rossa E (2010) Probabilistic petrophysical-properties estimation integrating statistical rock physics with seismic inversion. Geophysics 75(3):21–37

    Article  Google Scholar 

  • Grana D, Pirrone M, Mukerji T (2012) Quantitative log interpretation and uncertainty propagation of petrophysical properties and facies classification from rock-physics modeling and formation evaluation analysis. Geophysics 77(3):45–63

    Article  Google Scholar 

  • Hastie T, Tibshirani R, Friedman J (2009) The elements of statistical learning, 2nd edn. Springer, New York

    Book  Google Scholar 

  • Kaufman L, Rousseeuw PJ (1990) Finding groups in data: an introduction to cluster analysis. Wiley, New York

    Book  Google Scholar 

  • Kennedy J, Pujiyono AC, Aldred R (2010) Using quantified model based petrophysical uncertainty to aid in conflict resolution. In: Transactions of the SPWLA 51st Annual Symposium. SPWLA

  • Krumbein WC, Dacey MF (1969) Markov chains and embedded Markov chains in geology. Math Geol 1(1):79–96

    Article  Google Scholar 

  • Li Y, Anderson-Sprecher R (2006) Facies identification from well logs: a comparison of discriminant analysis and naive Bayes classifier. J Pet Sci Eng 53(3–4):149–157

    Article  Google Scholar 

  • Negahdari A, Ziaii M, Ghiasi-Freez J (2014) Application of discriminant analysis for studying the source rock potential of probable formations in the Lorestan basin. Iran Int J Min Geo Eng 48(1):31–54

    Google Scholar 

  • Poupon A, Leveaux J (1971) Evaluation of water saturation in shaly formations. In: Transactions of the SPWLA 12th Annual Symposium

  • Verga F, Viberti D, Gonfalini M (2002) Uncertainty evaluation in well logging: analytical or numerical approach? In: Transactions of the SPWLA 43rd Annual Symposium

  • Viberti D (2010) A rigorous mathematical approach for petrophysical estimation. Am J Appl Sci 7(11):1509–1516

    Article  Google Scholar 

  • Viterbi AJ (1967) Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Trans Inf Theory 13(2):260–269

    Article  Google Scholar 

  • Wang G, Carr TR (2012) Methodology of organic-rich shale lithofacies identification and prediction: a case study from Marcellus Shale in the Appalachian basin. Comput Geosci 49:151–163

    Article  Google Scholar 

  • Wang G, Carr TR, Ju Y, Li C (2014) Identifying organic-rich Marcellus Shale lithofacies by support vector machine classifier in the Appalachian basin. Comput Geosci 64:52–60

    Article  Google Scholar 

  • Ward JHJ (1963) Hierarchical grouping to optimize an objective function. J Am Stat Assoc 58:236–244

    Article  Google Scholar 

  • Wong PM, Jian FX, Taggart IJ (1995) A critical comparison of neural networks and discriminant analysis in lithofacies, porosity and permeability predictions. J Pet Geol 18(2):191–206

    Article  Google Scholar 

  • Wu CFJ (1983) On the convergence properties of the EM algorithm. Ann Stat 11(1):95–103

    Article  Google Scholar 

  • Xu C, Torres-Verdin C (2014) Petrophysical rock classification in the cotton valley tight-gas sandstone reservoir with a clustering pore-system orthogonality matrix. Interpretation 2(1):13–23

    Article  Google Scholar 

Download references


Authors acknowledge Enerplus Resources (USA) Corp. for data assistance and University of Wyoming for the support. The work is partially funded by the Uncertainty in reservoir Evaluation (URE) activity—consortium at Department of Mathematical Sciences, NTNU, Trondheim, Norway.

Author information

Authors and Affiliations


Corresponding author

Correspondence to David Volent Lindberg.

Appendix: The Baum–Welch Algorithm

Appendix: The Baum–Welch Algorithm

Let forward probabilities \(\alpha \) indicate conditioning on data up to the current step, that is \(\alpha _i(t)=p(X_t=i|y_1,\ldots ,y_t)\) and \(\alpha _{ij}(t)=p(X_{t-1}=i,X_t=j|y_1,\ldots ,y_t)\) while backwards probabilities \(\gamma \) indicate conditioning on all the data, that is \(\gamma _i(t)=p(X_t=i|y_1,\ldots ,y_T)\) and \(\gamma _{ij}(t)=p(X_{t-1}=i,X_t=j|y_1,\ldots ,y_T)\). The Baum–Welch algorithm according to Baum et al. (1970) follows, with multivariate Gaussian likelihood models \(\phi (y;\mu ,\Sigma )\) for each state.

Algorithm: Baum–Welch algorithm

Set initial \(\lambda ^*=\{A^*,B^*,\pi ^*\}\) where \(A^*=\{P^*\}\) and \(B^*=\{\mu _i^*,\Sigma _i^*\}_{i=1\ldots ,N}\).

Iteratively do:

Forward recursions:

  • Initiate

    • \(C_{1} = \left[ \sum _{i=1}^N \phi (y_1;\mu _i^*,\Sigma _i^*) \times \pi _i^* \right] ^{-1}\)

    • \(\alpha _i(1)= C_1 \times \phi (y_1;\mu _i^*,\Sigma _i^*)\times \pi _i^* \;, \quad i=1,\ldots ,N\)

  • Iterate for \(t=2,\ldots ,T\)

    • \( C_t = \left[ \sum _{i=1}^N\sum _{j=1}^N \phi (y_t;\mu _j^*,\Sigma _j^*) \times P_{ij}^* \times \alpha _i(t-1)\right] ^{-1}\)

    • \(\alpha _{ij}(t)=C_t\times \phi (y_t;\mu _j^*,\Sigma _j^*) \times P_{ij}^* \times \alpha _i(t-1), \quad i,j=1,\ldots ,N\)

    • \(\alpha _j(t) = \sum _{i=1}^N \alpha _{ij}(t), \quad j=1,\ldots ,N\)

Backward recursions:

  • Initiate

    • \(\gamma _j(T)= \alpha _j(T), \quad j=1,\ldots ,N\)

  • Iterate for \(t=T,\ldots ,2\)

    • \(\gamma _{ij}(t)= \frac{\alpha _{ij}(t)}{\alpha _j(t)} \times \gamma _j(t), \quad i,j=1,\ldots ,N\)

    • \(\gamma _i(t-1) = \sum _{j=1}^N \gamma _{ij}(t), \quad i=1,\ldots ,N\)

Update the parameters:

  • Update the parameters \(\lambda \) by

    • \(\pi _i = \gamma _i(1), \quad i=1,\ldots ,N \)

    • \(P_{ij} = \frac{\sum _{t=2}^{T} \gamma _{ij}(t)}{\sum _{t=1}^T \gamma _i(t)}, \quad i,j=1,\ldots ,N\)

    • \(\mu _i = \frac{\sum _{t=1}^T y_t \times \gamma _i(t)}{\sum _{t=1}^T \gamma _i(t)}, \quad i=1,\ldots ,N\)

    • \(\Sigma _i = \frac{\sum _{t=1}^T (y_t-\mu _i)(y_t-\mu _i)' \times \gamma _i(t)}{\sum _{t=1}^T \gamma _i(t)}, \quad i=1,\ldots ,N\)

  • Set \(\lambda ^*=\lambda \)

After convergence is reached, the final parameter set \(\lambda \) is the maximum likelihood estimate according to Eq. (6). Moreover, the maximum a posteriori prediction of the categorical sequence \(\mathbf {x}\) is obtained from the backward probabilities \(\{\gamma _i(1),\gamma _{ij}(2), \ldots ,\gamma _{ij}(T)\}_{i,j=1,\ldots ,N}\) through the Viterbi algorithm (Viterbi 1967).

Rights and permissions

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lindberg, D.V., Grana, D. Petro-Elastic Log-Facies Classification Using the Expectation–Maximization Algorithm and Hidden Markov Models. Math Geosci 47, 719–752 (2015).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: