Abstract The accurate identification of gas–liquid flow regimes in pipes remains a challenge for the chemical process industries. This paper proposes a method for flow regime identification that combines responses from a nonintrusive optical sensor with linear discriminant analysis (LDA) and quadratic discriminant analysis (QDA) for vertical upward gas–liquid flow of air and water. A total of 165 flow conditions make up the dataset, collected from an experimental air–water flow loop with a transparent test section (TS) of 27.3 mm inner diameter and 5 m length. Selected features extracted from the sensor response are categorized into feature group 1, average sensor response and standard deviation, and feature group 2 that also includes percentage counts of the calibrated responses for water and air. The selected features are used to train, cross validate, and test four model cases (LDA1, LDA2, QDA1, and QDA2). The LDA models produce higher average test classification accuracies (both 95%) than the QDA models (80% QDA1 and 45% QDA2) due to misclassification associated with the slug and churn flow regimes. Results suggest that the LDA1 model case is the most stable with the lowest average performance loss and is therefore considered superior for flow regime identification. In future studies, a larger dataset may improve stability and accuracy of the QDA models, and an extension of the conditions and parameters would be a useful test of applicability.