Python and Machine Learning for Geosciences

Geosciences are rooted in observational studies. However, these days there is an increasing demand for geoscientists and engineers who are comfortable with programming and computation. This first part of the course introduces the Python programming language and its application to Geosciences.

Artificial intelligence (AI) and machine learning (ML) methods are widely used in different domains of science and enable us to study and extract knowledge from vast amounts of data. Such applications have great value in geosciences. The second part of the course introduces the fundamentals of AI and ML, and the application of these methods to various geoscience problems.

Course content

Part 1, Python:

  • Fundamentals of Python
  • Functions, classes, and libraries
  • Analysing univariate and bivariate data
  • Analysing orientation, spatial and image data
  • Analysing subsurface data: well logs and seismic
  • Uncertainty and probability
  • Linear algebra in geosciences: Vectors (lines) and tensors (stress)

Part 2, ML:

  • Basics and applications of ML in geosciences
  • Supervised versus unsupervised ML
  • Regression and classification
  • 1D Rock properties prediction using ML
  • Automatic seismic interpretation using  ML  
  • Possible student project: Evaluation of trap integrity for CO2 storage

Application to the course:

Please apply to the course here

Course start up: 10.10.2022

Application deadline: 31.03.2022

For any questions, please contact:

How is the course structured?

The course runs for 2 weeks; part 1 will be covered in week 1 (Monday to Friday), and part 2 in week 2 (Monday to Friday). The first week will be taught at the University of Stavanger (physical), and the second week will be taught at the University of Oslo (either physical or digital). Lectures will be held in the morning, and lab sessions in the afternoon. Throughout the course, we will use Python notebooks and briefly describe the theory before going directly into the applications. This is a practical course, and the focus is on learning by doing.


10 study points, PhD level.


2 obligatory assignments, each one 25% of the final grade.

A final project counting 50% of the final grade.

Grades are awarded on a scale from A (excellent) to F (unsatisfactory).


Nestor Cardozo, Professor of Structural Geology at UiS (website)

Anita Torabi, Professor of Structural Geology at UiO (website)

Behzad Alaei, Associate Professor in Geophysics at UiO, Chief Geoscientist at Earth Science Analytics (website)