# documents

url: https://doi.org/https://doi.org/10.1186/s40537-020-00369-8
title: CatBoost for big data: an interdisciplinary review | Journal of Big Data | Full Text
scrape_date: 2025-03-14T13:30:58.140154
content_type: markdown
hash: 2bf3bb3b4179c0f70b4522fc8dc07ab7303f7e065f1d3b4b9e2a82b5835820ca
content:
Skip to main content

Advertisement

[ ![Advertisement](//pubads.g.doubleclick.net/gampad/ad?iu=/270604982/springer_open/journalofbigdata/articles&sz=728x90,970x90&pos=LB1&doi=10.1186/s40537-020-00369-8&type=article&kwrd=CatBoost,Big data,Categorical variable encoding,Ensemble methods,Machine learning,Decision tree&pmc=I18024,I18032,I18030,M14026,M13110,T24035&) ](//pubads.g.doubleclick.net/gampad/jump?iu=/270604982/springer_open/journalofbigdata/articles&sz=728x90,970x90&pos=LB1&doi=10.1186/s40537-020-00369-8&type=article&kwrd=CatBoost,Big data,Categorical variable encoding,Ensemble methods,Machine learning,Decision tree&pmc=I18024,I18032,I18030,M14026,M13110,T24035&)

[ ![SpringerOpen](/static/images/springeropen/logo-springer-open-d04c3ea16c.svg) ](https://www.springeropen.com)

Search

  * [ Get published ](//www.springeropen.com/get-published)
  * [ Explore Journals ](//www.springeropen.com/journals)
  * [ Books ](https://www.springer.com/gp/open-access/books)
  * [ About ](//www.springeropen.com/about)
  * [ My account ](https://www.springeropen.com/account)



Search all SpringerOpen articles

Search

[Journal of Big Data](/)

  * [About](/about)
  * [Articles](/articles)
  * [Submission Guidelines](/submission-guidelines)
  * [Submit manuscript](https://submission.nature.com/new-submission/40537/3)




CatBoost for big data: an interdisciplinary review 

[ Download PDF ](//journalofbigdata.springeropen.com/counter/pdf/10.1186/s40537-020-00369-8.pdf)

[ Download ePub ](//journalofbigdata.springeropen.com/counter/epub/10.1186/s40537-020-00369-8.epub)

[ Download PDF ](//journalofbigdata.springeropen.com/counter/pdf/10.1186/s40537-020-00369-8.pdf)

[ Download ePub ](//journalofbigdata.springeropen.com/counter/epub/10.1186/s40537-020-00369-8.epub)

  * Survey Paper
  * [Open access](https://www.springernature.com/gp/open-research/about/the-fundamentals-of-open-access-and-open-research)
  * Published: 04 November 2020



# CatBoost for big data: an interdisciplinary review

  * John T. Hancock [ORCID: orcid.org/0000-0003-0699-3042](http://orcid.org/0000-0003-0699-3042)1 &
  * Taghi M. Khoshgoftaar1



[_Journal of Big Data_](/) **volume 7**, Article number: 94 (2020) Cite this article

  * 39k Accesses

  * 693 Citations

  * 2 Altmetric

  * [Metrics details](/articles/10.1186/s40537-020-00369-8/metrics)




## Abstract

Gradient Boosted Decision Trees (GBDT’s) are a powerful tool for classification and regression tasks in Big Data. Researchers should be familiar with the strengths and weaknesses of current implementations of GBDT’s in order to use them effectively and make successful contributions. CatBoost is a member of the family of GBDT machine learning ensemble techniques. Since its debut in late 2018, researchers have successfully used CatBoost for machine learning studies involving Big Data. We take this opportunity to review recent research on CatBoost as it relates to Big Data, and learn best practices from studies that cast CatBoost in a positive light, as well as studies where CatBoost does not outshine other techniques, since we can learn lessons from both types of scenarios. Furthermore, as a Decision Tree based algorithm, CatBoost is well-suited to machine learning tasks involving categorical, heterogeneous data. Recent work across multiple disciplines illustrates CatBoost’s effectiveness and shortcomings in classification and regression tasks. Another important issue we expose in literature on CatBoost is its sensitivity to hyper-parameters and the importance of hyper-parameter tuning. One contribution we make is to take an interdisciplinary approach to cover studies related to CatBoost in a single work. This provides researchers an in-depth understanding to help clarify proper application of CatBoost in solving problems. To the best of our knowledge, this is the first survey that studies all works related to CatBoost in a single publication.

## Introduction

Modeling a system with regression or classification are common ways to scientifically investigate phenomena. Since Supervised Machine Learning (\\(\text {ML}\\)) [[1](/articles/10.1186/s40537-020-00369-8#ref-CR1 "Kotsiantis SB, Zaharakis I, Pintelas P. Supervised machine learning: a review of classification techniques. Emerg Artif Intellig Appl Comput Eng. 2007;160\(1\):3–24.")] provides a way to automatically create regression and classification models from labeled datasets, researchers use Supervised \\(\text {ML}\\) to model all sorts of phenomena in various fields. Hence, it is vital to stay informed on supervised \\(\text {ML}\\) techniques practitioners currently use to achieve success. This is the first study that takes an interdisciplinary approach to reveal the emerging body of literature that shows CatBoost is an effective tool for use in supervised \\(\text {ML}\\) techniques.

CatBoost is an open source, Gradient Boosted Decision Tree (GBDT) implementation for Supervised \\(\text {ML}\\) bringing two innovations: Ordered Target Statistics and Ordered Boosting. We cover these innovations in detail in "[CatBoost Gradient Boosted Trees Implementation](/articles/10.1186/s40537-020-00369-8#Sec5)" section. In the seminal paper on CatBoost, “Catboost: unbiased boosting with categorical features” [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], Prokhorenkova et al. recommend using \\(\text {GBDT}\\) algorithms with heterogeneous data. They write, “For many years, it [gradient boosting] has remained the primary method for learning problems with heterogeneous features, noisy data, and complex dependencies: web search, recommendation systems, weather forecasting, and many others...” Heterogeneous datasets contain features with different data types. Tables in relational databases are often heterogeneous. The opposite of heterogeneous data is homogeneous data. Homogeneous data is data that is all the same type. For example, a dataset of features composed of pixel color intensity values is homogeneous. Such data may be multidimensional, but the components of each dimension are all the same type of data. Some works we survey here give empirical evidence for Prokhorenkova et al. claim that \\(\text {GBDT}\\) algorithms yield better performance than other \\(\text {ML}\\) algorithms on tasks for heterogeneous data. Other works we review show that \\(\text {GBDT}\\) algorithms tend not to do as well as \\(\text {ML}\\) alternatives such as neural networks on tasks involving homogeneous data. However, research into applying neural networks to heterogenous data [[3](/articles/10.1186/s40537-020-00369-8#ref-CR3 "Johnson JM, Khoshgoftaar TM. Deep learning and data sampling with imbalanced big data. In: 2019 IEEE 20th international conference on information reuse and integration for data science \(IRI\). 2019; p. 175–183."), [4](/articles/10.1186/s40537-020-00369-8#ref-CR4 "Johnson JM, Khoshgoftaar TM. Medicare fraud detection using neural networks. J Big Data. 2019;1:1.")], is an active area of research. Therefore, researchers should give consideration to the nature of the data they intend to use for \\(\text {ML}\\) implementations. It may be a mistake to consider only \\(\text {GBDT}\\) algorithms if the data is homogeneous, and it may also be a mistake to ignore \\(\text {GBDT}\\) algorithms if the data is heterogeneous.

In the interdisciplinary segment, we provide examples of experiments that will guide the reader in avoiding these mistakes. However, we feel the concept is important enough to merit immediate coverage here. Matsusaka et al. in “Prediction model of aryl hydrocarbon receptor activation by a novel qsar approach, deepsnap–deep learning” published a study that compares the performance of Gradient Boosted \\(\text {ML}\\) algorithms to deep learning algorithms [[5](/articles/10.1186/s40537-020-00369-8#ref-CR5 "Yasunari M, Takuomi H, Anna O, Kouichi Y, Uesawa Y. Prediction model of aryl hydrocarbon receptor activation by a novel qsar approach, deepsnap-deep learning. Molecules. 2020;25\(6\):1317.")]. In their study, the authors report on the results of applying these algorithms to digital image data, that is, homogeneous data. The authors document that a deep learning algorithm gives better performance in terms of Area Under the Receiver Operating Characteristic Curve (\\(\text {AUC}\\)) and accuracy. This is not surprising to us, since Matsusaka et al. are evaluating the performance of these algorithms on homogeneous data. Matsusaka et al. results serve as a reminder to researchers applying \\(\text {ML}\\) algorithms to homogeneous data to consider that gradient boosted algorithms may not be the best choice. Below, we cover multiple studies that confirm the same idea: CatBoost is a good solution for problems involving heterogeneous data, but may not be the optimal learner for problems involving homogeneous data. To put it succinctly, we find CatBoost is best suited to heterogeneous data.

Apart from the degree of heterogeneity of one’s data, a researcher working with Big Data [[6](/articles/10.1186/s40537-020-00369-8#ref-CR6 "Johnson JM, Khoshgoftaar TM. Survey on deep learning with class imbalance. J Big Data. 2019;6\(1\):1–54."), pp. 12–13] must also consider the time complexity of \\(\text {ML}\\) algorithms. When working with large datasets, small differences in the time required to execute high frequency operations can result in large differences in the total time required to conduct experiments. Three studies we cover in detail, Prokhorenkova et al. [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], Spadon et al. [[7](/articles/10.1186/s40537-020-00369-8#ref-CR7 "Spadon Gabriel, de Carvalho Andre C P L F, Rodrigues-Jr Jose F, Alves Luiz G A. Reconstructing commuters network using machine learning and urban indicators. Scientific Reports. 2019;9\(1\):N.PAG.")] and Anghel et al. [[8](/articles/10.1186/s40537-020-00369-8#ref-CR8 "Anghel A, Papandreou N, Parnell T, Palma A, Pozidis H. Benchmarking and optimization of gradient boosting decision tree algorithms, 2018.")], show mixed results on the training time consumption of CatBoost and XGBoost [[9](/articles/10.1186/s40537-020-00369-8#ref-CR9 "Chen T, Guestrin C. Xgboost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining—KDD ’16. 2016.")]. We believe this is due to differences in hyper-parameters that the authors use to configure the learning algorithms. We also cover scenarios that show where researchers may trade running time for accuracy by using CatBoost or an alternative. Overall, we find the mixed results for running time complexity of CatBoost versus other learners that we hypothesize is rooted in CatBoost’s sensitivity to hyper-parameter settings.

We find one study that highlights CatBoost’s sensitivity to hyper-parameter settings that may shed some light on the discrepancies in the training time performance of CatBoost and other learners that we discover later in this review. This study is “Benchmarking and optimization of gradient boosting decision tree algorithms” by Anghel et al. [[8](/articles/10.1186/s40537-020-00369-8#ref-CR8 "Anghel A, Papandreou N, Parnell T, Palma A, Pozidis H. Benchmarking and optimization of gradient boosting decision tree algorithms, 2018.")]. In this study the authors document training time and accuracy for CatBoost, XGBoost, and LightGBM [[10](/articles/10.1186/s40537-020-00369-8#ref-CR10 "Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, Ye Q, Liu TY. Lightgbm: a highly efficient gradient boosting decision tree. In: Guyon I, Luxburg UV, Bengio S, Wallach H, Fergus R, Vishwanathan S, Garnett R, editors. Advances in neural information processing systems. New York: Curran Associates; 2017. p. 3146–54.")] on four benchmarking tasks involving large datasets. Figure [1](/articles/10.1186/s40537-020-00369-8#Fig1), copied from [[8](/articles/10.1186/s40537-020-00369-8#ref-CR8 "Anghel A, Papandreou N, Parnell T, Palma A, Pozidis H. Benchmarking and optimization of gradient boosting decision tree algorithms, 2018."), Fig. 2], contains plots of training times versus maximum validation scores during hyper-parameter optimization. It shows how training times vary widely as Anghel et al. change the algorithms’ hyper-parameters during optimization. We find Panel b interesting. This is where the authors report the results for the algorithms on the EpsilonFootnote 1 benchmark. On the left side of Panel B, we see that some for some hyper-parameter configurations, CatBoost yields a maximum validation score sometime between 10 and 100 min, but for other configurations, it takes nearly 1000 min. In [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], Prokhorenkova et al. compare running time of CatBoost and XGBoost on a task involving the Epsilon dataset. However, XGBoost is missing from Panel b of Fig. [1](/articles/10.1186/s40537-020-00369-8#Fig1). Anghel et al. report that they were unable to run XGBoost on the Epsilon benchmark due to memory constraints. That impediment to running XGBoost is an indication that, under the methods of their experiment, XGBoost consumes more memory than CatBoost for the same task. We include this result to emphasize that one may find it necessary to adjust CatBoost’s hyper-parameter settings in order to obtain the best results for CatBoost in terms of training time.

**Fig. 1**

[![figure 1](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig1_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/1)

Image from [[8](/articles/10.1186/s40537-020-00369-8#ref-CR8 "Anghel A, Papandreou N, Parnell T, Palma A, Pozidis H. Benchmarking and optimization of gradient boosting decision tree algorithms, 2018.")] showing sensitivity of CatBoost to hyper-parameter settings; **a** records performance on the Higgs benchmark, **b** performance on the Epsilon benchmark, **c** performance on the Microsft benchmark, and **d** performance on the Yahoo Benchmark

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/1)

The application of GBDT algorithms for classification and regression tasks to many types of Big Data is well studied [11,12,[13](/articles/10.1186/s40537-020-00369-8#ref-CR13 "Sheshasaayee A, Lakshmi JVN. An insight into tree based machine learning techniques for big data analytics using apache spark. 2017 International Conference on Intelligent Computing, Instrumentation and Control Technologies \(ICICICT\), July 2017; pp. 1740–1743.")]. To the best of our knowledge, this is the first survey specifically dedicated to the CatBoost implementation of \\(\text {GBDT}\\)’s. Since its debut at the December 2018 Advances in Neural Information Processing Systems (\\(\text {NIPS}\\)) conference [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], researchers have conducted many experiments involving CatBoost. A number of these studies either involve Big Data, or techniques that will scale to Big Data. Hence, it is time for a review of these studies from a Big Data perspective. Researchers that work in Big Data environments often do so with a particular distributed framework, such as Apache Spark [[14](/articles/10.1186/s40537-020-00369-8#ref-CR14 "Matei Z, Reynold XS, Patrick W, Tathagata D, Michael a, A Dave, Xiangrui M, Josh R, Shivaram V, Michael FJ, Ghodsi A, Joseph G, Schenkert S, I Stoica. Apache spark: a unified engine for big data processing. Commun. ACM. 2016;59\(11\):56–65.")]. Some of these frameworks include GBDT implementations. For example, Spark MLlib’s GradientBoostedTrees module, [[15](/articles/10.1186/s40537-020-00369-8#ref-CR15 "Ensembles—rdd-based api. 
                  https://spark.apache.org/docs/latest/mllib-ensembles.html
                  
                , 2020.")], is one such implementation. For examples of GBDT applications in Spark please see [[16](/articles/10.1186/s40537-020-00369-8#ref-CR16 "Hasanin T, Khoshgoftaar TM, Leevy JL. A comparison of performance metrics with severely imbalanced network security big data. In: 2019 IEEE 20th international conference on information reuse and integration for data science \(IRI\). IEEE. 2019; p 83–88.")] and [[11](/articles/10.1186/s40537-020-00369-8#ref-CR11 "Hasanin T, Khoshgoftaar TM, Leevy JL, Bauder RA. Investigating class rarity in big data. J Big Data. 2020;7\(1\):1–17.")] . However, as long as the distributed framework supports a language that the Gradient Boosted Decision Tree implementation has an application programming interface \\(\text {API}\\) available for, it is possible to use that implementation in the framework; thus, freeing the user to select from the most appealing GBDT implementation available. For researchers wishing to employ CatBoost with very large datasets, one viable approach is to fit a CatBoost model to a representative sample using the CatBoost Python API, then apply a CatBoost model to the larger dataset using a distributed framework such as Spark or Hadoop [[17](/articles/10.1186/s40537-020-00369-8#ref-CR17 "Sudha P, Gunavathi R. A survey paper on map reduce in big data. International Journal of Science and Research. 2016;5\(9\).")] with CatBoost’s Java API. We provide this one example to show applying CatBoost to large datasets with popular distributed frameworks is feasible. However, we recognize that there exists a multitude of distributed frameworks suitable for Big Data that, in turn, support a myriad of programming languages. So, there should be many more valid approaches to applying trained CatBoost models to Big Data.

Researchers in disparate domains find applications for CatBoost. We find works in the fields of Astronomy [[18](/articles/10.1186/s40537-020-00369-8#ref-CR18 "Khramtsov V, Sergeyev A, Spiniello C, Tortora C, Napolitano NR, Agnello A, Getman F, Jong JTA, Kuijken K, Radovich M, Shan H, Shulga V. KiDS-SQuaD II. Machine learning selection of bright extragalactic objects to search for new gravitationally lensed quasars. Astonomy Astrophys. 2019;2019:632.")], Finance [19,20,21,[22](/articles/10.1186/s40537-020-00369-8#ref-CR22 "Zhang Haichao, Zeng Ruishuang, Chen Linling, Zhang Shangfeng. Research on personal credit scoring model based on multi-source data. J Phys Conference Series. 2020;1437:012053.")], Medicine [23,24,25,[26](/articles/10.1186/s40537-020-00369-8#ref-CR26 "Yang H, Bath PA. The use of data mining methods for the prediction of dementia: evidence from the english longitudinal study of aging. IEEE J Biomed Health Inform. 2020;24\(2\):345–53.")], Biology [[27](/articles/10.1186/s40537-020-00369-8#ref-CR27 "Kolesnikov AA, Kikin PM, Portnov AM. Diseases spread prediction in tropical areas by machine learning methods ensembling and spatial analysis techniques. ISPRS. 2019;8XLII–3/W:221–6."), [28](/articles/10.1186/s40537-020-00369-8#ref-CR28 "Lin F, Cui EM, Lei Y, Luo L. Ct-based machine learning model to predict the fuhrman nuclear grade of clear cell renal cell carcinoma. Abdominal Radiol. 2019;44\(7\):2528–34.")], Electrical Utilities Fraud [29,30,[31](/articles/10.1186/s40537-020-00369-8#ref-CR31 "Punmiya R, Choe S. Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing. IEEE Trans Smart Grid. 2019;10\(2\):2326–9.")], Meteorology [[32](/articles/10.1186/s40537-020-00369-8#ref-CR32 "Fan Junliang, Wang Xiukang, Zhang Fucang, Ma Xin, Lifeng Wu. Predicting daily diffuse horizontal solar radiation in various climatic regions of china using support vector machine and tree-based soft computing models with local and extrinsic climatic data. J Clean Prod. 2020;248:119264."), [33](/articles/10.1186/s40537-020-00369-8#ref-CR33 "Huang G, Lifeng W, Ma X, Zhang W, Fan J, Xiang Y, Zeng W, Zhou H. Evaluation of catboost method for prediction of reference evapotranspiration in humid regions. J Hydrol. 2019;574:1029–41.")], Psychology [[34](/articles/10.1186/s40537-020-00369-8#ref-CR34 "Abolfazli A, Brechmann A, Wolff S, Spiliopoulou M. Machine learning identifies the dynamics and influencing factors in an auditory category learning experiment. Sci Rep. 2020;10\(1\):1."), [35](/articles/10.1186/s40537-020-00369-8#ref-CR35 "Arkaprabha S, Ishita B. Screening of anxiety and depression among the seafarers using machine learning technology. Inform Med Unlocked. 2019;16:100149.")], Traffic Engineering [[7](/articles/10.1186/s40537-020-00369-8#ref-CR7 "Spadon Gabriel, de Carvalho Andre C P L F, Rodrigues-Jr Jose F, Alves Luiz G A. Reconstructing commuters network using machine learning and urban indicators. Scientific Reports. 2019;9\(1\):N.PAG."), [36](/articles/10.1186/s40537-020-00369-8#ref-CR36 "Liu W, Deng K, Zhang X, Cheng Y, Zheng Z, Jiang F, Peng J. A semi-supervised tri-catboost method for driving style recognition. Symmetry. 2020;3:336.")], Cyber-security [[37](/articles/10.1186/s40537-020-00369-8#ref-CR37 "Bakhareva N, Shukhman A, Matveev A, Polezhaev P, Ushakov Y, Legashev L. Attack detection in enterprise networks by machine learning methods. In: 2019 international Russian automation conference \(RusAutoCon\). 2019; pages 1–6.")], Bio-chemistry [[5](/articles/10.1186/s40537-020-00369-8#ref-CR5 "Yasunari M, Takuomi H, Anna O, Kouichi Y, Uesawa Y. Prediction model of aryl hydrocarbon receptor activation by a novel qsar approach, deepsnap-deep learning. Molecules. 2020;25\(6\):1317."), [38](/articles/10.1186/s40537-020-00369-8#ref-CR38 "Yi Hai-Cheng, You Zhu-Hong, Guo Zhen-Hao. Construction and analysis of molecular association network by combining behavior representation and node attributes. Front Genetics. 2019;10:1.")], and Marketing [[39](/articles/10.1186/s40537-020-00369-8#ref-CR39 "Koehn D, Lessmann S, Schaal M. Predicting online shopping behaviour from clickstream data using deep learning. Expert Syst Appl. 2020;150:113342.")]. Therefore, a good understanding of CatBoost may provide one the opportunity to participate in interdisciplinary research. Our third finding is that the wide range of subjects where CatBoost is applicable is evidence that it is a general-purpose algorithm that behooves researchers to understand. On the other hand, as the works we survey demonstrate, CatBoost works better in some situations than others. We take an interdisciplinary approach to study different subject areas where researchers use CatBoost. For each of the subject areas we list here, we provide a section that details how researchers use CatBoost in that specific domain.

Before we cover applications of CatBoost in various domains, we discuss our search method, we cover related works, and then provide an overview of the GBDT ensemble technique, and the CatBoost implementation of GBDT’s. We touch on another GBDT implementation, LightGBM [[10](/articles/10.1186/s40537-020-00369-8#ref-CR10 "Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, Ye Q, Liu TY. Lightgbm: a highly efficient gradient boosting decision tree. In: Guyon I, Luxburg UV, Bengio S, Wallach H, Fergus R, Vishwanathan S, Garnett R, editors. Advances in neural information processing systems. New York: Curran Associates; 2017. p. 3146–54.")]. Like CatBoost, LightGBM has built-in support for encoding categorical variables. XGBoost is another GBDT implementation without built-in support for categorical features, so we choose not to give details on it. First of all, we provide details on the method we use to discover articles we cover.

### Search method

We used our University library database, Google Scholar [[40](/articles/10.1186/s40537-020-00369-8#ref-CR40 "Google.com. Google scholar. 
                  http://scholar.google.com
                  
                , May 2020.")], and the Web of Science [[41](/articles/10.1186/s40537-020-00369-8#ref-CR41 "Clarivate. Web of science. 2020. 
                  http://login.webofknowledge.com
                  
                . Accessed 16 Feb 2020.")] databases to search for the term “CatBoost.” We obtained results with 278 articles from OneSearch, 25 articles from Web of Science, and the first 100 results from Google Scholar. We then conducted a manual review of the 403 records resulting from the search. During the manual review we retained only the studies related to CatBoost and its applications. We do not include works where the authors mention CatBoost, but do not employ it in any experiment. We do not limit our search results to any specific subject area.

### Related work

In order to find related work, we review all studies retrieved using the search method detailed in the previous section, looking specifically for surveys on CatBoost. We did not find such a study. To the best of our knowledge, this is the first review that focuses exclusively on research involving the CatBoost implementation of GBDT’s. We therefore expanded our search for surveys on Gradient Boosted techniques, and find two related studies.

Prior to the introduction of CatBoost, Sagi and Rokach published “Ensemble learning: a survey” [[42](/articles/10.1186/s40537-020-00369-8#ref-CR42 "Omer S, Lior R. Ensemble learning: a survey. WIREs Data Mining Knowl Discov. 2018;8\(4\):e1249.")]. This work is broader in scope and covers ensemble methods in general. It was published in 2018, and includes a discussion of Gradient Boosted Decision Tree algorithms, but not CatBoost.

Another related work is “A survey of classification techniques in data mining” by Sujatha and Prabhakar [[43](/articles/10.1186/s40537-020-00369-8#ref-CR43 "Sujatha M, Prabhakar S, Lavanya GD. A survey of classification techniques in data mining. Int J Innovations Eng Technol \(IJIET\). 2013;2\(4\):1058–2319.")]. This study also covers a broader range of \\(\text {ML}\\) algorithms than what we cover here. Sujatha and Prabhakar published this study in 2013, prior to the release of CatBoost. Furthermore, it does not provide the depth of detail on GBDT algorithms that we go into here.

The absence of a survey of research where CatBoost is used, and the abundance of recent work involving CatBoost, indicates to us that a survey of these works is timely. A thorough understanding of GBDT’s and CatBoost is necessary before one delves into the different ways researchers apply CatBoost in various fields. Therefore, we continue with a review of GBDT’s and the CatBoost implementation of GBDT’s. After that, we conduct the interdisciplinary review, grouping coverage of works by field. From this perspective, one may see how to apply CatBoost given a problem in the same domain.

## Gradient Boosted Decision Trees

Jerome H. Friedman describes Gradient Boosting in the study titled “Greedy function approximation: a gradient boosting machine” [[44](/articles/10.1186/s40537-020-00369-8#ref-CR44 "Friedman JH. Greedy function approximation: a gradient boosting machine. Ann Stat. 2001;12:1189–232.")]. In his paper, Friedman describes the Gradient Boosting \\(\text {ML}\\) technique. Since it is a supervised \\(\text {ML}\\) technique, we begin with a set \\(\left\\{ {\mathbf {x}}_i, y_i\right\\}\\) of input values \\({\mathbf {x}}_i\\), and expected output values \\({y_i}\\), \\(i \in \left\\{ 1 \ldots n\right\\}\\). Gradient boosting takes the approach of iteratively constructing a collection of functions \\(F^0, F^1, \ldots , F^t, \ldots , F^m\\), given a loss function \\({\mathcal {L}}\left( y_i, F^t\right)\\). Here we would like to emphasize that \\({\mathcal {L}}\\) has two input values, the _i_ th expected output value \\(y_i\\), and the _t_ th function \\(F^t\\) that estimates \\(y_i\\). Assuming we have constructed function \\(F^t\\) we can improve our estimates of \\(y_i\\) by finding another function \\(F^{t+1} = F^t + h^{t+1}\left( {\mathbf {x}}\right)\\) such that \\(h^{t+1}\\) minimizes the expected value of the loss function. That is,

$$\begin{aligned} h^{t+1} = \underset{h \in H}{\mathrm {argmin}} {\mathbb {E}} {\mathcal {L}}\left( y, F^t\right) . \end{aligned}$$

(1) 

Where _H_ is the set of candidate Decision Trees we are evaluating to choose one to add to the ensemble. Furthermore, by the definition of \\(F^{t+1}\\), we can write the expected value of the loss function \\({\mathcal {L}}\\) in terms of \\(F^t\\) and \\(h^{t+1}\\):

$$\begin{aligned} {\mathbb {E}} {\mathcal {L}}\left( y, F^{t+1}\right) = {\mathbb {E}} {\mathcal {L}}\left( y, F^{t}+ h^{t+1} \right) \end{aligned}$$

(2) 

One may notice that the right-hand side of Eq. ([2](/articles/10.1186/s40537-020-00369-8#Equ2)) implies we wish to minimize the loss function’s value on _y_ and \\(F^{t}\\) plus _something_. If we assume \\({\mathcal {L}}\\) is continuous, and differentiable, we can add something related to the rate of change of \\({\mathcal {L}}\\) to \\(F^t\\) to shift its value somewhere in the direction that \\({\mathcal {L}}\\) is decreasing. Therefore, if we set \\(h^{t+1}\\) to values in the direction that the gradient of \\({\mathcal {L}}\\) with respect to \\(F^t\\) is decreasing the fastest, we would have the \\(h^{t+1}\\) that approximately minimizes \\({\mathbb {E}} {\mathcal {L}}\left( y, F^t+h^{t+1}\right)\\). Under these assumptions then we can write a reasonable approximation for \\(h^{t+1}\\),

$$\begin{aligned} h^{t+1} \approx \underset{h \in H}{\mathrm {argmin}} {\mathbb {E}}\left( \frac{\partial {\mathcal {L}} y}{\partial F^t} - h \right) ^2. \end{aligned}$$

(3) 

We refer to this technique as Gradient Boosting because we use the partial derivatives (gradients) of the loss function \\({\mathcal {L}}\\) with respect to the function \\(F^t\\) to find \\(h^{t+1}\\). Prokhorenkova et al. [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")] point out that we may not have an easy way to compute \\(\underset{h \in H}{\mathrm {argmin}} {\mathbb {E}}\left( \frac{\partial {\mathcal {L}} y}{\partial F^t} - h \right) ^2\\). This could be because it would be difficult, in general, to say what the probability of specific values of \\(\underset{h \in H}{\mathrm {argmin}} {\mathbb {E}}\left( \frac{\partial {\mathcal {L}} y}{\partial F^t} - h \right) ^2\\) should be, and we may not know what \\(F^t\\) should be because we could be using stochastic techniques, such as some algorithm to construct a Decision Tree to define \\(F^t\\). However, we can assume, as Prokhorenkova et al. suggest,

$$\begin{aligned} \underset{h \in H}{\mathrm {argmin}} {\mathbb {E}}\left( \frac{\partial {\mathcal {L}} y}{\partial F^t} - h \right) ^2 \approx \underset{h \in H}{\mathrm {argmin}} \frac{1}{n}\left( \frac{\partial {\mathcal {L}} y}{\partial F^t} - h \right) ^2. \end{aligned}$$

(4) 

Although we are covering Friedman’s Gradient Boosting Decision Trees technique in this section, we use this reference to Prokhorenkova et al. in our explanation, since our ultimate goal is to provide the reader a clear understanding of CatBoost.

We can take approximations ([3](/articles/10.1186/s40537-020-00369-8#Equ3)) and ([4](/articles/10.1186/s40537-020-00369-8#Equ4)) to obtain a concrete estimate for \\(h^{t+1}\\):

$$\begin{aligned} h^{t+1} \approx \underset{h \in H}{\mathrm {argmin}} \frac{1}{n}\left( \frac{\partial {\mathcal {L}} y}{\partial F^t} - h \right) ^2. \end{aligned}$$

(5) 

For GBDT’s the base case \\(F^0\\) is a Decision Tree, and the \\(h^1, h^2, \ldots , h^t, \ldots h^m\\) are also Decision Trees. When we add a Decision Tree to construct \\(F^{t+1}\\) in this manner, the expected value of the loss function \\({\mathbb {E}} {\mathcal {L}}\left( y, F^{t+1}\left( {\mathbf {x}}\right) \right)\\) shrinks, implying that the estimates \\(F^{j+1}\left( {\mathbf {x}}_i\right)\\) are better than the estimates \\(F^{j}\left( {\mathbf {x}}_i\right)\\). CatBoost, as well as other currently popular GBDT techniques XGBoost and LightGBM, make refinements to the Gradient Boosting technique Friedman describes in [[44](/articles/10.1186/s40537-020-00369-8#ref-CR44 "Friedman JH. Greedy function approximation: a gradient boosting machine. Ann Stat. 2001;12:1189–232.")]. Researchers who have a good understanding of how the GBDT technique works have a better chance of successfully applying it in any discipline. Similarly, researchers who know how CatBoost carries out the GBDT technique are better equipped to employ it in any domain. Therefore, we provide details on CatBoost in the next section.

### CatBoost Gradient Boosted Trees Implementation

In [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], Prokhorenkova et al. propose the CatBoost algorithm, and compare it with XGBoost and LightGBM. In their description of the CatBoost learner, they cover their refinements to the GBDT algorithm Friedman describes in [[44](/articles/10.1186/s40537-020-00369-8#ref-CR44 "Friedman JH. Greedy function approximation: a gradient boosting machine. Ann Stat. 2001;12:1189–232.")]. Here we cover these refinements and some related hyper-parameters that users should be aware of since the related hyper-parameters’ values may also affect the resources CatBoost consumes.

CatBoost’s first refinement to Gradient Boosting is the manner in which it deals with high cardinality categorical variables. For low cardinality categorical variables, CatBoost uses one-hot encoding. The precise definition of low cardinality depends on the computing environment and whether the user is employing CatBoost in any specialized modes. The current version of CatBoost at the time of this writing, version 0.23.2, has a default value of 255 under some conditions when running on GPU’s, and 2 when running on CPU’s provided certain other specific conditions are not met. This is an obvious, yet non-trivial example of CatBoost’s sensitivity to hyper-parameters. One may obtain different results in terms of running time and other performance metrics since changing this hyper-parameter not only alters the type of processor CatBoost will use, but also the manner in which it will encode categorical features. We refer the reader to the CatBoost API documentationFootnote 2 for further details on how CatBoost sets the threshold for one-hot encoding.

In [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], Prokhorenkova et al. use the term “Ordered Target Statistic” to refer to the technique CatBoost uses for encoding categorical variables, when CatBoost is not using one-hot encoding. Micci-Barreca introduces target statistics in “A preprocessing scheme for high-cardinality categorical attributes in classification and prediction problems” [[45](/articles/10.1186/s40537-020-00369-8#ref-CR45 "Micci-Barreca Daniele. A preprocessing scheme for high-cardinality categorical attributes in classification and prediction problems. SIGKDD Explor Newsl. 2001;3\(1\):27–32.")]. A target statistic is a value we calculate from the ground truth output values associated with particular values of a categorical attribute in a dataset. One strategy for dealing with categorical variables in \\(\text {ML}\\) is to replace the categorical values of a feature with a target statistic.

The most important concept in the Ordered TS calculation is rooted in the distinction between training and test datasets. Let \\({\mathcal {D}}\\) be the set of all data available to train and evaluate our GBDT ensemble. The Decision Tree \\(h^{t+1}\\) we add to the ensemble is the Decision Tree that minimizes the expected value of the loss function \\({\mathbb {E}} {\mathcal {L}}\\). We wish to use some data in \\({\mathcal {D}}\\) for fitting the Decision Tree \\(h^{t+1}\\), and some data for finding the \\(h^{t+1}\\) that minimizes \\({\mathbb {E}} {\mathcal {L}}\\). Our motivation for using the data in \\({\mathcal {D}}\\) in this way is to avoid what Prokhorenkova et al. define as “target leakage” [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")]. We explain more on target leakage below; however, we finish our description of CatBoost’s encoding technique first. The way CatBoost chooses the data to use for fitting \\(h^{t+1}\\) is to place an arbitrary order on the elements of \\({\mathcal {D}}\\) with a random permutation \\(\sigma\\). Let \\(\sigma \left( k\right)\\) be the _k_ th element of \\({\mathcal {D}}\\) under \\(\sigma\\), and \\({\mathcal {D}}_k = \left\\{ {\mathbf {x}}_1, {\mathbf {x}}_2, \ldots , {\mathbf {x}}_{k-1} \right\\}\\), ordered by the random permutation \\(\sigma\\). CatBoost uses \\({\mathcal {D}}_k\\) as the data for fitting the Decision Tree \\(h^{t+1}\\), and \\({\mathcal {D}}\\) as the data for evaluating whether \\(h^{t+1}\\) is the Decision Tree that minimizes \\({\mathbb {E}} {\mathcal {L}}\left( y, F^{t}+ h^{t+1} \right)\\). The meaning of the notation \\({\mathcal {D}}_k\\) is the first important concept for understanding how CatBoost encodes the values of categorical variables.

The second important concept for understanding how CatBoost encodes the values of categorical variables is the indicator function \\(\mathbb {1}\\). The indicator function \\(\mathbb {1}_{a=b}\\) is a function of one variable _a_ that has the value 1 when \\(a=b\\), and 0 otherwise. The indicator function plays an important role in the formula CatBoost applies to map the values of a categorical feature to a numerical value. Specifically, this formula involves the indicator function \\(\mathbb {1}_{x_j^i=x_k^i}\\). This indicator function takes the value 1 when the _i_ th component of CatBoost’s input vector \\({\mathbf {x}}_j\\) is equal to the _i_ th component of the input vector \\({\mathbf {x}}_k\\). Here we use _k_ as in the _k_ th element according to the order we put on \\({\mathcal {D}}\\) with the random permutation \\(\sigma\\), and _i_ takes on the integer values 1 through \\(k-1\\).

Understanding these key concepts of the training data \\({\mathcal {D}}\\) and the indicator function \\(\mathbb {1}_{x_j^i=x_k^i}\\), enables us to define the formula for the encoded value, \\({\hat{x}}_i^k\\), of the _i_ th categorical variable of the _k_ th element of \\({\mathcal {D}}\\) as:

$$\begin{aligned} {\hat{x}}_k^i = \frac{\sum _{x_j \in {\mathcal {D}}_k} \mathbb {1}_{x_j^i = x_k^i} \cdot y_j + a p}{\sum _{x_j \in {\mathcal {D}}_k} \mathbb {1}_{x_j^i = x_k^i} + a}. \end{aligned}$$

(6) 

Prokhorenkova et al. define _p_ as a prior commonly set to the average value of the label in the dataset, and _a_ as a parameter greater than 0. We do not see a clear suggestion for the value of _a_ [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")]. However, one can see that setting _a_ to a value greater than 0 in Eq. ([6](/articles/10.1186/s40537-020-00369-8#Equ6)) ensures we will not divide by 0 in the case that none of the values \\(x_j^i\\) equal \\(x_k^i\\). Also, in that case, any value \\(a > 0\\) guarantees \\({\hat{x}}_k^i\\) gets the value _p_.

CatBoost applies Eq. ([6](/articles/10.1186/s40537-020-00369-8#Equ6)) when fitting the Decision Tree \\(h^{t+1}\\), but uses a variation of it when evaluating \\(h^{t+1}\\) to determine if it is _the_ Decision Tree that minimizes \\({\mathbb {E}} {\mathcal {L}}\left( y, F^{t}+ h^{t+1} \right)\\). The variation on Eq. ([6](/articles/10.1186/s40537-020-00369-8#Equ6)) is that instead of using the subset \\({\mathcal {D}}_k\\), it uses the entire set \\({\mathcal {D}}\\).

Now that we have an understanding of how CatBoost encodes categorical variables, we can understand why it uses this technique. As we mention above, CatBoost encodes categorical values in order to alleviate the problem of target leakage. Prokhorenkova _et al._ write that CatBoost avoids target leakage because the technique it uses for encoding categorical variables has a certain property, that they express in Eq. ([7](/articles/10.1186/s40537-020-00369-8#Equ7))

$$\begin{aligned} {\mathbb {E}} \left( {\hat{x}}^i |y=v \right) = {\mathbb {E}} \left( {\hat{x}}_k^i |y_k=v \right) . \end{aligned}$$

(7) 

Interestingly, the way CatBoost’s encoding technique satisfies this property is to ensure we do _not_ use the value \\(y_k\\) in Eq. ([6](/articles/10.1186/s40537-020-00369-8#Equ6)). Prokhorenkova et al. explain that if we use \\(y_k\\) to encode features in \\({\mathbf {x}}_k\\) we create target leakage [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")]. They define target leakage in terms of conditional shift. Noting that Eq. ([7](/articles/10.1186/s40537-020-00369-8#Equ7)) involves conditional probabilities, we see that if Eq. ([7](/articles/10.1186/s40537-020-00369-8#Equ7)) does not hold, it means that the expected value of all encoded values for the _i_ th feature given a specific output value _v_ does not equal the expected value of the encoded values for some training examples \\(\left( {\mathbf {x}}_k,y_k\right)\\). In other words, when Eq. ([7](/articles/10.1186/s40537-020-00369-8#Equ7)) does not hold, the expected encoded value \\({\hat{x}}_k^i\\) is shifted under the condition \\(y_k=v\\). This is an overfitting condition in the sense that in the fitting process the model can exploit the correlation between \\({\hat{x}}_k\\) and \\(y_k\\) during training, but the correlation will not exist during testing due to the difference in expected values when Eq. ([7](/articles/10.1186/s40537-020-00369-8#Equ7)) does not hold. The way they suggest avoiding the shifting of the expected values under the conditions \\(y = v\\) and \\(y_k = v\\) is to exclude the value of \\(y_k\\) in the computation of values for \\({\hat{x}}^i\\) when encoding the value \\(x_k^i\\); hence, the definition of \\({\mathcal {D}}_k\\) above, and its role in computing the value of \\({\hat{x}}_k^i\\) in Eq. ([6](/articles/10.1186/s40537-020-00369-8#Equ6)) above.

The second property of the Ordered TS that Prokhorenkova _et al._ describe is that it eventually uses all training examples \\(\left( {\mathbf {x}}_k, y_k\right)\\). This property ensures that after sufficient iterations, we have encoded categorical values with all the information available in the training data. This second property balances the overfitting protection of the first property, to ensure we are not underfitting, because we are using all the available training data.

The way Prokhorenkova _et al_. enforce this property is another refinement to Gradient Boosting that they call the Ordered Boosting technique. Target leakage not only causes a conditional shift in the expected value of an encoded variable, but also it causes prediction shift in the expected value of the residuals we wish to minimize. To see why this is so, consider Approximation ([5](/articles/10.1186/s40537-020-00369-8#Equ5)), and assume we are using CatBoost’s Ordered Target Statistic technique to encode some categorical variables to build the Gradient Boosted Decision Trees that constitute \\(F^{t+1}\\). Then, because we are using Ordered Target Statistics to encode categorical variables, \\(\frac{\partial {\mathcal {L}} y}{\partial F^t}\\) is also a random variable because we use the random permutation \\(\sigma \left( k\right)\\) to choose the elements of \\(D_k\\) to encode categorical variables that influence the value of \\(F^t\\). Therefore, the distribution of \\(\frac{\partial {\mathcal {L}} y}{\partial F^t}\\) can be shifted under the condition that we calculated \\(\frac{\partial {\mathcal {L}} y}{\partial F^t}\\) with a particular encoding for \\(x_k^i\\). Prokhorenkova _et al._ explain that this conditional shift leads to bias in the estimate we make for \\(h^{t+1}\\), and that negatively impacts the metrics we obtain when evaluating of \\(F^{t+1}\\) on data we did not use at training time. Prokhorenkova et al. refer to the impact on \\(F^{t+1}\\) as its generalization ability. To combat this impact on \\(F^{t+1}\\)’s generalization ability, Prokhorenkova et al. propose Ordered Boosting. The key concept in Ordered Boosting is to use the same examples in \\({\mathcal {D}}_k\\) that we use to compute the Ordered Target Statistics, to compute the estimates for \\(h^{t+1}\\), which means we must use them to compute the values of \\(\frac{\partial {\mathcal {L}} y}{\partial F^t}\\). The reader will recall that \\({\mathcal {D}}_k = \left\\{ {\mathbf {x}}_1, {\mathbf {x}}_2, \ldots , {\mathbf {x}}_{k-1}\right\\}\\) depends on where we are at in iterating through the permutation \\(\sigma\\) of the elements of \\({\mathcal {D}}\\). In other words, when we start with \\(k=1\\), \\({\mathcal {D}}_k\\) will have one element in it. This means we will have a high variance in values we estimate for \\(\frac{\partial {\mathcal {L}} y}{\partial F^t}\\). So, in Ordered Boosting, CatBoost uses multiple, independent permutations \\(\sigma _1, \sigma _2, \ldots , \sigma _s\\) of \\({\mathcal {D}}\\) to compute a number of sets of residual values that it can use to find \\(h^{t+1}\\), to obtain \\(F^{t+1}\\), and maintain the guarantee that none of the values of \\(x_k^i\\) are used to compute the values of the gradients \\(\frac{\partial {\mathcal {L}} y}{\partial F^t}\\). At the same time using these multiple sets of residuals reduces the variance in CatBoost’s estimates of \\(\frac{\partial {\mathcal {L}} y}{\partial F^t}\\). This is how Ordered Boosting avoids prediction shift.

Another important concept in CatBoost’s process of building Decision Trees is Oblivious Decision Trees (\\(\text {ODT}\\)’s). CatBoost constructs an ensemble of ODT’s. ODT’s are full binary trees, so if the ODT has _n_ levels, it will have \\(2^n\\) nodes. Furthermore, all non-leaf nodes of the ODT will have the same splitting criteria. To assist the reader’s understanding, in Table [1](/articles/10.1186/s40537-020-00369-8#Tab1), we include a diagram of an ODT from Lou and Obukhov, “Bdt: gradient boosted decision tables for high accuracy and scoring efficiency” [[46](/articles/10.1186/s40537-020-00369-8#ref-CR46 "Yin L, Mikhail O. Bdt: Gradient boosted decision tables for high accuracy and scoring efficiency. In: Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining. 2017; pp. 1893–1901.")]. According to Prokhorenkova et al., ODT’s “...are balanced, less prone to overfitting, and allow speeding up execution at testing time significantly” [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")]. We see ODT’s are balanced by definition. Since they are full binary trees the number of comparisons to reach a leaf node is the minimum number of comparisons to reach the maximum number of leaf nodes, so we agree that ODTs may yield more efficient executions than deeper Decision Trees that are not completely filled. The trade-off is that one must be careful in setting the maximum tree depth in CatBoost since the amount of memory CatBoost will use may grow by a factor of 2 times the number of trees in the ensemble for every unit of increase in the maximum tree depth. This is another example of CatBoost’s sensitivity to hyper-parameter settings that researchers should be aware of since it can have an impact on the amount of memory and running time their experiments consume. Perhaps the differences in running time complexity we see are rooted in improper values for this hyper-parameter.

**Table 1 Oblivious Decision Tree example from Lou and Obukhov demonstrating a Decision Tree and Decision Table that provide equivalent logic [[46](/articles/10.1186/s40537-020-00369-8#ref-CR46 "Yin L, Mikhail O. Bdt: Gradient boosted decision tables for high accuracy and scoring efficiency. In: Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining. 2017; pp. 1893–1901.")]**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/1)

Another useful feature CatBoost adds to GBDT’s is its support for interactions of features. Prokhorenkova et al. refer to these interactions as “feature combinations.” The authors claim CatBoost will greedily choose the most efficacious combinations of features during training [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")]. Furthermore, CatBoost will use the Ordered TS method for encoding new features it generates from feature combinations when the combination of features includes a categorical variable. It is outside the scope of this survey to investigate whether other Decision Tree algorithms automatically discover new categorical features from combinations of other categorical features. To the best of our knowledge this is an innovation unique to CatBoost and another compelling reason for applying CatBoost in situations where one is working with data that has categorical features. Researchers should be aware of this functionality since it can impact the amount of time it takes for CatBoost to fit a GBDT model. One may control the maximum number of categorical features CatBoost will attempt to combine by setting a hyper-parameter value. This is another hyper-parameter value that CatBoost is sensitive to. Differences in the values researchers use for this hyper-parameter may account for some contradictory results we find in the literature on CatBoost.

CatBoost is an implementation of Gradient Boosted Decision Trees that avoids conditional shift with Ordered TS and prediction shift with Ordered Boosting. Both Ordered TS and Ordered Boosting rely on iterating through random permutations of a dataset. In Ordered TS we ensure that we do not use a specific training example \\(\left( {\mathbf {x}}_k, y_k\right)\\) to encode any categorical component \\(x^i_k\\) of \\({\mathbf {x}}_k\\). In Ordered Boosting, we use the same random permutation we use in Ordered TS to ensure we do not use the training example \\(\left( {\mathbf {x}}_k, y_k\right)\\) to estimate the rate of change of the loss function we are using to improve (boost) the model’s estimate of \\(y_k\\) for the input value \\({\mathbf {x}}_k\\). Also, in Ordered Boosting, we use several random permutations of our data simultaneously to reduce variance in our estimates of the rate of change of the loss function. CatBoost’s use of Ordered TS and Ordered Boosting make it a good choice for datasets with categorical variables that are sparse, or infrequently occur with specific target values, since these techniques guarantee that, given some unusual training example, CatBoost will involve other examples to update its estimate for the unusual example systematically. However, CatBoost is not the only GBDT algorithm that provides automatic encoding of categorical features. For a broad discussion on embedding techniques, please see [[47](/articles/10.1186/s40537-020-00369-8#ref-CR47 "Hancock JT, Khoshgoftaar TM. Survey on categorical data for neural networks. J Big Data. 2020;7:1–41.")]. In the next section we explain how a related GBDT implementation provides this functionality.

### LightGBM Support for Categorical Variables

LightGBM is another GBDT algorithm that supports automatic encoding categorical features. We discuss it here to give the reader an understanding of the difference in encoding techniques. Many of the works we include in this study compare the performance of LightGBM to CatBoost. The article that introduces LightGBM “Lightgbm: a highly efficient gradient boosting decision tree” by Ke _et al._ , does not mention support for categorical features [[10](/articles/10.1186/s40537-020-00369-8#ref-CR10 "Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, Ye Q, Liu TY. Lightgbm: a highly efficient gradient boosting decision tree. In: Guyon I, Luxburg UV, Bengio S, Wallach H, Fergus R, Vishwanathan S, Garnett R, editors. Advances in neural information processing systems. New York: Curran Associates; 2017. p. 3146–54.")]. However, LightGBM’s online documentation [[48](/articles/10.1186/s40537-020-00369-8#ref-CR48 "Microsoft Corporation. Advanced topics. 2020. 
                  https://lightgbm.readthedocs.io/en/latest/Advanced-Topics.html
                  
                .")] states that LightGBM uses a technique from Fisher in the article “On grouping for maximum homogeneity” [[49](/articles/10.1186/s40537-020-00369-8#ref-CR49 "Fisher WD. On grouping for maximum homogeneity. J Am Stat Assoc. 1958;53\(284\):789–98.")]. Interestingly, in the references in the study that introduces CatBoost [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], Prokhorenkova et al. also refer to the LightGBM on-line documentation, as well as the LightGBM source code when they mention LightGBM’s support for categorical features. Our point is that the LightGBM creators did not indicate they felt LightGBM’s handling of categorical variables was significant enough to document as a contribution in the article that introduces LightGBM. Fisher’s technique, that LightGBM uses, partitions a set of arbitrary numbers into subsets with minimum variance between members of the partitions. LightGBM applies Fisher’s technique when evaluating the splitting criteria for a categorical feature as it is growing a Decision Tree. LightGBM constructs a histogram of the values of a categorical feature, then sorts the histogram by gradient statistics. It then iterates through the sorted histogram to divide the set of values of the categorical feature into two groups. Prokhorenkova et al. criticize the technique LightGBM uses for two reasons. The first is that the technique requires more memory than using Ordered \\(\text {TS}\\) because LightGBM must maintain gradient statistics for all possible values of a categorical feature. The second issue Prokhorenkova et al. point out is that it is computationally expensive for LightGBM to compute the gradient statistics necessary to build the sorted histogram. Furthermore, Prokhorenkova et al. also point out that in LightGBM’s documentation [[50](/articles/10.1186/s40537-020-00369-8#ref-CR50 "Microsoft Corporation. Lightgbm. 2020. 
                  https://github.com/Microsoft/LightGBM/blob/master/src/treelearner/feature_histogram.hpp
                  
                .")], the authors appear to back away from recommending LightGBM’s technique for handling categorical features. We understand this to mean that the LightGBM documentation’s authors caution the user not to use LightGBM support for high-cardinality categorical features.

With CatBoost and LightGBM both being GBDT implementations, and both providing similar functionality to support automatic handling of categorical features, one may be curious to see how these learners perform when compared against each other on the same \\(\text {ML}\\) task. Moreover, one may wish to know the same for other types of learners as well. Many studies we include document experiments to answer this question. Hence, in the next section, we provide tables that summarize the outcomes of these experiments. Studies are grouped by field in these tables. Perhaps it is disappointing that there is no clear winner in all situations. However, this fact motivates us to investigate the details of these works to see why this is the case in the sections following the tables.

## CatBoost applications by field

### Tables of works studied

A good measure of the generality of an idea is its applicability in diverse settings. We mention existing surveys on applications of \\(\text {GBDT}\\) algorithms in our section on related works. This shows that \\(\text {GBDT}\\) algorithms are rooted in a general idea. We review studies where the authors use CatBoost in a wide array of fields. Hence, CatBoost is implemented in such a way that it preserves the generality of Friedman’s conception of the \\(\text {GBDT}\\) algorithm. First, we summarize the works we cover in Tables [2](/articles/10.1186/s40537-020-00369-8#Tab2), [3](/articles/10.1186/s40537-020-00369-8#Tab3), [4](/articles/10.1186/s40537-020-00369-8#Tab4), [5](/articles/10.1186/s40537-020-00369-8#Tab5), [6](/articles/10.1186/s40537-020-00369-8#Tab6), [7](/articles/10.1186/s40537-020-00369-8#Tab7), [8](/articles/10.1186/s40537-020-00369-8#Tab8), [9](/articles/10.1186/s40537-020-00369-8#Tab9), [10](/articles/10.1186/s40537-020-00369-8#Tab10), [11](/articles/10.1186/s40537-020-00369-8#Tab11) and [12](/articles/10.1186/s40537-020-00369-8#Tab12). Then, we cover them in detail, grouped by the fields the works contribute to.

**Table 2 Machine learning**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/2)

**Table 3 Traffic engineering**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/3)

**Table 4 Finance**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/4)

**Table 5 Astronomy**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/5)

**Table 6 Cyber-security**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/6)

**Table 7 Meteorology**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/7)

**Table 8 Medicine**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/8)

**Table 9 Biology**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/9)

**Table 10 Marketing**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/10)

**Table 11 Bio-chemistry**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/11)

**Table 12 Electrical utilities fraud**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/12)

In the sections that follow, we organize studies involving CatBoost by subject. As we review works in specific fields, general techniques that apply in multiple disciplines become apparent. We take an objective look at CatBoost’s performance in many applications to show where it is a good choice, and where it is not. The first subject area we cover is the field of Astronomy.

### Astronomy

Published in 2012 [[53](/articles/10.1186/s40537-020-00369-8#ref-CR53 "de Jong JTA, Kleijn GAV, Kuijken KH, Valentijn EA. The kilo-degree survey. Exp Astron. 2013;35\(1–2\):25–44.")], The Kilo Degree Survey \\(\text {KiDS}\\), de Jong et al. is the result of an Astronomical study that researchers for the European Southern Observatory (\\(\text {ESO}\\)) carried out using equipment in the Very Large Telescope installation in Chile. According to de Jong et al. the full KiDS survey is 15 terabytes (\\(\text {TB}\\)) of data. Given such a volume of data, some form of automation is necessary to conduct research on it. Supervised \\(\text {ML}\\) is one way to approach data of this magnitude. One such study that takes the Supervised \\(\text {ML}\\) approach specifically with CatBoost is “Kids-squad ii. machine learning selection of bright extragalactic objects to search for new gravitationally lensed quasars”, by Khramtsov et al. [[18](/articles/10.1186/s40537-020-00369-8#ref-CR18 "Khramtsov V, Sergeyev A, Spiniello C, Tortora C, Napolitano NR, Agnello A, Getman F, Jong JTA, Kuijken K, Radovich M, Shan H, Shulga V. KiDS-SQuaD II. Machine learning selection of bright extragalactic objects to search for new gravitationally lensed quasars. Astonomy Astrophys. 2019;2019:632.")]. In this article, the authors use CatBoost to classify objects in \\(\text {KiDS}\\) data into the categories: stars, quasi-stellar radio sources (\\(\text {quasar}\\)), and galaxies. After they classify objects in \\(\text {KiDS}\\) data, Khramtsov et al. take on the task of creating a catalog of gravitationally lensed quasars. Gravitational lensing refers to the alteration of an object’s appearance when the light from it is bent as it travels through the gravitational field of another massive object. According to Khramtsov et al. gravitationally lensed quasars are interesting for astronomers because they can be used for studying the expansion history of the universe, dark matter around galaxies, and planets outside our solar system.

In order to create a training sample, Khramtsov et al. use data from an earlier study, the Sloan Digital Sky Survey (\\(\text {SDSS}\\)) [[54](/articles/10.1186/s40537-020-00369-8#ref-CR54 "Abolfathi B, et al. The fourteenth data release of the sloan digital sky survey: first spectroscopic data from the extended Baryon oscillation spectroscopic survey and from the second phase of the apache point observatory galactic evolution experiment. Astrophys J Suppl Series. 2018;235\(2\):42.")], as a source for labels. They create a training dataset from the data on objects that are present in both \\(\text {SDSS}\\) and \\(\text {KiDS}\\). Their training dataset has 127,376 instances.

The features the authors use are derived from color intensity measurements of objects in the KiDS data. The data contain nine optical or infrared colors, and Khramtsov et al. mention that they also use 36 combinations of pairs of colors, and one continuous feature CLASS_STAR, that takes a value from 0 to 1, that gauges how point-like a light source is. Khramtsov et al. write that they perform classification in a 37 dimensional features space, which implies they discard the 9 original color intensity features after they derive the 36 features from pairs of color intensity features. The total number of instances in the \\(\text {KiDS}\\) data that they classify is approximately 9.6 million. Khramtsov et al. report that their \\(\text {KiDS}\\) data is imbalanced, since their final classification finds 5,665,586 galaxies, 3,660,368 stars, and 145,653 quasars, and 122,306 instances of indeterminate class. For in-depth coverage of techniques for addressing class imbalance, please see [[55](/articles/10.1186/s40537-020-00369-8#ref-CR55 "Leevy JL, Khoshgoftaar TM, Bauder RA, Seliya N. A survey on addressing high-class imbalance in big data. J Big Data. 2018;5\(1\):42.")]. Khramtsov et al. apply threshold values to the list of output probabilities of the CatBoost classifier to partition \\(\text {KiDS}\\) data into classes. The indeterminate instances are those where the probability that the instance is a quasar or a galaxy are approximately the same.

Khramtsov et al. evaluate three different Decision Tree based ensemble techniques for classifying their labeled data: CatBoost, XGBoost, and Random Forest. Please see Fig. [2](/articles/10.1186/s40537-020-00369-8#Fig2) for confusion matrices of each classifier’s performance on the hold-out dataset. We find the confusion matrices for Random Forest and CatBoost to be quite similar. However, Khramtsov et al. find CatBoost yielded the best performance for the classification task. In our discussion on CatBoost, we write that Prokhorenkova et al. claim that Oblivious Decision Trees are less prone to overfitting. Khramtsov et al. provide some empirical evidence for the claim in Appendix A.3, where they report that CatBoost, “...is more able to generalize good results on an unseen dataset.” [[18](/articles/10.1186/s40537-020-00369-8#ref-CR18 "Khramtsov V, Sergeyev A, Spiniello C, Tortora C, Napolitano NR, Agnello A, Getman F, Jong JTA, Kuijken K, Radovich M, Shan H, Shulga V. KiDS-SQuaD II. Machine learning selection of bright extragalactic objects to search for new gravitationally lensed quasars. Astonomy Astrophys. 2019;2019:632.")] Their justification for this statement is that on the hold-out dataset, CatBoost yields a smaller difference in Matthews’ Correlation Coefficient (\\(\text {MCC}\\)) between training and hold-out datasets.

**Fig. 2**

[![figure 2](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig2_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/2)

Confusion matrices from Khramtsov et al. showing the relative performance of Random Forest, CatBoost and XGBoost on the hold-out dataset [[18](/articles/10.1186/s40537-020-00369-8#ref-CR18 "Khramtsov V, Sergeyev A, Spiniello C, Tortora C, Napolitano NR, Agnello A, Getman F, Jong JTA, Kuijken K, Radovich M, Shan H, Shulga V. KiDS-SQuaD II. Machine learning selection of bright extragalactic objects to search for new gravitationally lensed quasars. Astonomy Astrophys. 2019;2019:632.")]

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/2)

In one study on Astronomy Khramtsov et al. make a clear case for using CatBoost. For their purposes, CatBoost is the best classifier for detecting quasars in the \\(\text {KiDS}\\) data. Khramtsov et al. follow a pattern we see in many of the fields we cover; they compare performance of multiple learners to select the best. In the studies that we cover next we see that CatBoost is usually a strong contender among GBDT implementations, and sometimes with other unrelated classification or regression \\(\text {ML}\\) algorithms. Overall, Khramtsov et al. study is a good example of how CatBoost works well with heterogeneous, categorical Big Data. At first glance, one may be tempted to think KiDS data is homogeneous since it consists of color intensities, but the CLASS_STAR feature makes the data heterogeneous. In the next section, we focus on the subject of applications of CatBoost to Finance.

### Finance

We find studies such as “Comparison between xgboost, lightgbm and catboost using a home credit dataset” by Essam Al Daoud that compare the performance of CatBoost to other algorithms in Finance-related \\(\text {ML}\\) tasks [[19](/articles/10.1186/s40537-020-00369-8#ref-CR19 "Daoud EA. Comparison between xgboost, lightgbm and catboost using a home credit dataset. Int J Comput Inf Eng. 2019;13\(1\):6–10.")]. This study compares XGBoost, LightGBM, and CatBoost on the \\(\text {ML}\\) task of predicting loan repayment given a list of features describing the borrower. Daoud reports that LightGBM yields the best performance in terms of AUC and training time. We do not see where Daoud provides a reference for the source of the Home Credit Dataset. Moreover, Daoud does not list hyper-parameters used in the experiments in [[19](/articles/10.1186/s40537-020-00369-8#ref-CR19 "Daoud EA. Comparison between xgboost, lightgbm and catboost using a home credit dataset. Int J Comput Inf Eng. 2019;13\(1\):6–10.")], so Daoud’s results may be difficult to reproduce. For example, one important hyper-parameter for CatBoost is iterations, that specifies the maximum number of Decision Trees CatBoost will construct. A low value for this parameter can impact CatBoost’s performance relative to other GBDT implementations. Since Daoud does not document this value, it is difficult to conclude that LightGBM is the best performer. We recommend as a best practice that researchers document hyper-parameters used in GBDT implementations they compare.

Daoud compares CatBoost to other GBDT implementations, but researchers have also explored blending CatBoost with other models. “Research on personal credit scoring model based on multi-source data” by Zhang et al. is a study where the authors classify borrowers into groups of those with overdue payments on their loans, and those who pay on time [[22](/articles/10.1186/s40537-020-00369-8#ref-CR22 "Zhang Haichao, Zeng Ruishuang, Chen Linling, Zhang Shangfeng. Research on personal credit scoring model based on multi-source data. J Phys Conference Series. 2020;1437:012053.")]. Zhang et al. do not name the dataset they use, but it appears to be different from the dataset Daoud uses since it has a different number of instances and is data from Chinese credit markets. Zhang et al. employ CatBoost, Random Forest, and Logistic Regression together using the “Stacking&Blending” method. The Stacking&Blending method is a linear combination of the outputs of CatBoost, Random Forest, and Logistic Regression. Zhang et al. report that with the Stacking&Blending technique, they determine the weights for the linear combination according to the accuracy of individual models, but they do not give any detail on precisely how the weights are calculated. It could be the case that the authors selected weights manually according to what gave the best result for their study. They write, “The \\(w_{ij}\\) used in this paper is determined by the accuracy of multiple trainings of a single model. The higher the accuracy of a single model, the greater the weight of the model.” \\(w_{ij}\\) is constant for any value of _j_ , the index of the sample, but changes for _i_ which is the index of the model. The weights they list are: 0.2 for Logistic Regression, 0.4 for random forest, and 0.4 for CatBoost. If Zhang et al. did not use a computational approach to find the values for these weights, there is an opportunity for further research to use an optimization technique to show what the best values for coefficients would be to use. Zhang et al. do not compare the performance of their blended model to any other model. Nevertheless, this work shows CatBoost is an effective component of a system for predicting when a borrower will have overdue payments. Their technique has an overall AUC of 0.73. While they show their Stacking&Blending technique has an AUC that is far better than what a random guess would yield, we do not see a direct comparison of this technique to other learners in their study. Zhang et al.’s study is a demonstration of the Stacking&Blending technique; however, the next finance-related study we cover is a more comprehensive comparison of more widely used techniques we find to be more informative.

We return to the task of predicting outright loan default with “Predicting loan default in peer-to-peer lending using narrative data”, by Xia et al. [[20](/articles/10.1186/s40537-020-00369-8#ref-CR20 "Yufei Xia, Lingyun He, Yinguo Li, Nana Liu, Yanlin Ding. Predicting loan default in peer-to-peer lending using narrative data. J Forecasting. 2020;39\(2\):260.")]. This study is an evaluation similar to Daoud [[19](/articles/10.1186/s40537-020-00369-8#ref-CR19 "Daoud EA. Comparison between xgboost, lightgbm and catboost using a home credit dataset. Int J Comput Inf Eng. 2019;13\(1\):6–10.")] that showcases CatBooost’s ability to predict when a borrower will default on a loan. Xia et al. work with data from Lending ClubFootnote 3, an online platform that connects individuals to facilitate making personal loans.

In their experiments, Xia et al. extract what they call “hard information” and “soft information” from data that Lending Club makes available to the public. In the context of their study, hard information is numerical data from loan applications: loan parameters, the applicant’s creditworthiness, and the applicant’s solvency. The soft information that Xia et al. work with relates to free-form text on the loan application. This includes: the number of times someone edits the loan description, number of words in the loan description, and a one-hot encoded feature calculated from the words in the loan description. The one-hot encoded feature is calculated from the output of a clustering algorithm, that is composed with the Skip-Gram variant of Word2Vec [[56](/articles/10.1186/s40537-020-00369-8#ref-CR56 "Tomas M, Ilya S, Kai C, Corrado Greg S, Dean Jeff. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, 2013; pp. 3111–3119.")], which is in turn composed with term frequency-inverse document frequency (\\(\text {TF-IDF}\\)) applied to the loan description text [[57](/articles/10.1186/s40537-020-00369-8#ref-CR57 "Rajaraman A, Ullman JD. Mining massive datasets. Cambridge: Cambridge University Press; 2011.")]. Xia et al. derive three datasets of hard and soft information from the Lending Club data, one dataset for each of the years 2011, 2012, and 2013.

The performance of different algorithms is compared to that of CatBoost. The algorithms used for comparison are: Logistic Regression (\\(\text {LR}\\)), Regression Tree (\\(\text {RT}\\)), Bagging Neural Network (\\(\text {BNN}\\)), Random Forest (\\(\text {RF}\\)), \\(\text {GBDT}\\)’s, and XGBoost. All of these algorithms are available in the Python Scikit-learn library [[58](/articles/10.1186/s40537-020-00369-8#ref-CR58 "Buitinck L, Louppe G, Blondel M, Pedregosa F, Mueller A, Grisel O, Niculae V, Prettenhofer P, Gramfort A, Grobler J, et al. API design for machine learning software: experiences from the scikit-learn project. In: ECML PKDD workshop: languages for data mining and machine learning. 2013; pp. 108–122.")] except for XGBoost. Their results show that combining their feature extraction technique with CatBoost yields the best performance in terms of accuracy, (\\(\text {AUC}\\)), H-measure [[59](/articles/10.1186/s40537-020-00369-8#ref-CR59 "Hand DJ. Measuring classifier performance: a coherent alternative to the area under the roc curve. Mach Learn. 2009;77\(1\):103–23.")] type I error rate, and type II error rate. It is also interesting to note that Xia et al. report using a Bayesian hyper-parameter tuning method. This could be a factor in why Xia et al. find CatBoost yields the best performance whereas Daoud does not in similar machine learning tasks.

We reproduce a part of [[20](/articles/10.1186/s40537-020-00369-8#ref-CR20 "Yufei Xia, Lingyun He, Yinguo Li, Nana Liu, Yanlin Ding. Predicting loan default in peer-to-peer lending using narrative data. J Forecasting. 2020;39\(2\):260."), Tab. 7] in Table [13](/articles/10.1186/s40537-020-00369-8#Tab13) below that shows the superior performance of CatBoost for predicting loan defaults in 2013 Lending Club data. Xia et al. also report the results of significance tests that show CatBoost’s superior performance is statistically significant. Metrics related to the running times of training or testing the models they compare are not reported in their study. They also do not report the running time performance of their feature extraction technique. Therefore, we see an opportunity for future research in evaluating these running times. This research is relevant in the field of Big Data since, with large datasets, one might be willing to trade off running time for performance metrics. Xia et al. results indicate CatBoost can be a good choice for predicting when a candidate borrower will default on a loan.

**Table 13 From [[20](/articles/10.1186/s40537-020-00369-8#ref-CR20 "Yufei Xia, Lingyun He, Yinguo Li, Nana Liu, Yanlin Ding. Predicting loan default in peer-to-peer lending using narrative data. J Forecasting. 2020;39\(2\):260.")], bracketed numbers are confidence intervals; _note_ we do not find where Xia et al. document the significance level for the confidence intervals; here “softer” means models are trained with all available features**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/13)

Moving on from the subject of using CatBoost to classify borrowers, another finance-related study involving CatBoost is “Short term electricity spot price forecasting using catboost and bidirectional long short term memory neural network” by Zhang and Fleyeh [[21](/articles/10.1186/s40537-020-00369-8#ref-CR21 "Zhang F, Fleyeh H. Short term electricity spot price forecasting using catboost and bidirectional long short term memory neural network. 2019 16th International Conference on the European Energy Market \(EEM\), Sep. 2019; pp. 1–6.")]. The role of CatBoost in this study is that of a feature selector. Zhang and Fleyeh use historical electricity futures prices time-series data as well as the categorical values: day of week, hour of day, and a weekend/ not weekend indicator. Zhang and Fleyeh also do autocorrelation analysis of time series data to discover which previous price data are likely predictors. They then use feature importance scoring functionality, which is part of the CatBoost software package, to determine which features to extract from their raw data to use as input to other \\(\text {ML}\\) algorithms. Using CatBoost as a feature selector to rank features is an interesting approach for researchers working with Big Data, since some datasets that qualify as Big Data have large numbers of features. CatBoost provides a way to automatically select features. Zhang and Fleyeh propose a novel composition of CatBoost and Bidirectional Long Short Term Memory (\\(\text {BDLSTM}\\)) [[60](/articles/10.1186/s40537-020-00369-8#ref-CR60 "Schuster M, Paliwal KK. Bidirectional recurrent neural networks. IEEE Trans Signal Process. 1997;45\(11\):2673–81.")] but they do not compare CatBoost as a feature selector to any other GBDT, or any other feature selection technique. Therefore, there is an opportunity for future research to compare the efficacy of different feature selection techniques in Zhang and Fleyeh’s technique for forecasting electricity spot prices. CatBoost’s built-in support for encoding categorical features makes it a convenient choice for a feature selection technique.

For finance-related studies involving CatBoost, we find research that is mostly credit-related. Zhang and Fleyeh’s use of CatBoost for feature selection is the exception to that rule. Therefore, there are opportunities for researchers to apply CatBoost to other sub-domains in finance, and be the first to do so. That CatBoost and LightGBM do well on the task of loan default prediction supports Prokhorenkova’s claim that GBDT’s do well for problems involving heterogeneous data. Also, Xia et al. use of a hyper-parameter optimization technique may explain why CatBoost outperforms LightGBM in Xia et al. experiments, but not in Daoud’s experiments. The next field we delve into is Medicine, and the first work we study in that field has something in common with [[22](/articles/10.1186/s40537-020-00369-8#ref-CR22 "Zhang Haichao, Zeng Ruishuang, Chen Linling, Zhang Shangfeng. Research on personal credit scoring model based on multi-source data. J Phys Conference Series. 2020;1437:012053.")]—it describes another blending technique.

### Medicine

“The use of data mining methods for the prediction of dementia: evidence from the english longitudinal study of aging” by Yang and Bath is a study that evaluates various combinations of classifiers [[26](/articles/10.1186/s40537-020-00369-8#ref-CR26 "Yang H, Bath PA. The use of data mining methods for the prediction of dementia: evidence from the english longitudinal study of aging. IEEE J Biomed Health Inform. 2020;24\(2\):345–53.")]. The classifiers they compare are CatBoost, XGBoost, Logistic Regression, Regularized Greedy Forests (\\(\text {RGF}\\)) [[61](/articles/10.1186/s40537-020-00369-8#ref-CR61 "Johnson R, Zhang T. Learning nonlinear functions using regularized greedy forest. IEEE Trans Pattern Anal Mach Intellig. 2014;36\(5\):942–54.")], and Convolutional Neural Networks (\\(\text {CNN}\\)) on the task of classifying individuals as having dementia, or not having dementia according to data available on them from the English Longitudinal Study on Aging \\(\text {ELSA}\\) [[62](/articles/10.1186/s40537-020-00369-8#ref-CR62 "Steptoe Andrew, Breeze Elizabeth, Banks James, Nazroo James. Cohort profile: the english longitudinal study of ageing. Int J Epidemiol. 2013;42\(6\):1640–8.")] dataset. The models are combined with an ensemble technique, similar to one Zhang et al. use in [[22](/articles/10.1186/s40537-020-00369-8#ref-CR22 "Zhang Haichao, Zeng Ruishuang, Chen Linling, Zhang Shangfeng. Research on personal credit scoring model based on multi-source data. J Phys Conference Series. 2020;1437:012053.")]. The final output of the ensemble is

$$\begin{aligned} y=\sum _{i=1}^n w_ix_i \end{aligned}$$

(8) 

where \\(x_i\\) is the output of the _i_ th model in the ensemble, and the \\(w_i\\) coefficients are subject to the constraint that they must sum to 1. Also, like Zhang _et al._ in [[22](/articles/10.1186/s40537-020-00369-8#ref-CR22 "Zhang Haichao, Zeng Ruishuang, Chen Linling, Zhang Shangfeng. Research on personal credit scoring model based on multi-source data. J Phys Conference Series. 2020;1437:012053.")], Yang and Bath do not provide details on how the \\(w_i\\) are calculated. This provides further motivation for research that elucidates how one might go about optimizing weights for ensembles involving CatBoost; since we have examples of research missing this information in two disparate fields – Finance, and here, Medicine. The evaluation metric the authors use is the Normalized Gini Coefficient, defined as \\(2 \times AUC -1\\). The Normalized Gini Coefficient has a scale from 0 to 1, but is nothing more than a linear transformation of \\(\text {AUC}\\). The algorithms used for addressing class imbalance in the data are Synthetic Minority Over-sampling Technique (\\(\text {SMOTE}\\)) [[63](/articles/10.1186/s40537-020-00369-8#ref-CR63 "Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP. synthetic minority over-sampling technique. Smote. 2002;16:321–57.")] and Adaptive Synthetic Sampling Approach (\\(\text {ADASYN}\\)) [[64](/articles/10.1186/s40537-020-00369-8#ref-CR64 "He H, Bai Y, Garcia EA, Li S. Adasyn: adaptive synthetic sampling approach for imbalanced learning. In: 2008 IEEE international joint conference on neural networks \(IEEE world congress on computational intelligence\). IEEE, New York. 2008; pp. 1322–8.")]. In addition, the authors use hyper-parameters for the various classifier implementations to address class imbalance. We feel using these parameters in addition to SMOTE or ADASYN would be redundant, since these algorithms balance the data before it is presented to a classifier. For further studies on application of techniques for addressing classs imbalance see [[65](/articles/10.1186/s40537-020-00369-8#ref-CR65 "Herland M, Bauder RA, Khoshgoftaar TM. The effects of class rarity on the evaluation of supervised healthcare fraud detection models. J Big Data. 2019;6\(1\):1.")] and [[6](/articles/10.1186/s40537-020-00369-8#ref-CR6 "Johnson JM, Khoshgoftaar TM. Survey on deep learning with class imbalance. J Big Data. 2019;6\(1\):1–54.")].

Yang and Beth report that the data they use in their study is imbalanced with 142 out of 9666 records in the positive class for one dataset they use, and 109 out of 8445 records in the positive class for another dataset. This is clearly not a study in Big Data since the dataset is small in comparison to others we cover in this study. However, we choose to cover the study here because Yang and Bath’s ensemble technique is interesting and applicable to larger datasets.

Yang and Bath perform a set of experiments, where the number of features and the combination of classifiers are factors in the experiments. In the study, the authors report that the raw data has 400 features. The authors include a supplementary spreadsheet that describes the data they use, and we find a maximum of 50 for the number of levels a feature can obtain. Furthermore, we can see that many of the features are categorical and heterogeneous with descriptions such as “father has diabetes” or “difficulty taking medications.” As we mentioned earlier, the default value for the minimum number of features CatBoost may use for encoding categorical variables with Ordered \\(\text {TS}\\) may be 255 if one runs CatBoost on GPU’s, so it could be the case that Yang and Bath did not take advantage of Ordered \\(\text {TS}\\) encoding of categorical variables, which could have had an impact on their results. Yang and Bath report on the performance of each learner separately, and several combinations in different ensembles. We include copies of both results in Tables [14](/articles/10.1186/s40537-020-00369-8#Tab14) and [15](/articles/10.1186/s40537-020-00369-8#Tab15). The tables show that CatBoost is not the best performing learner separately, and it is also not a member of the best performing ensemble. However, we do not find a significance test that shows the results of different classifiers is statistically significant. We choose to include this study since it highlights the use of CatBoost in the field of medicine, and techniques used are applicable in Big Data problems. The next item in our study is also in the medical field, but focuses on predicting a different sort of condition.

**Table 14 “Best Gini scores of individual ML algorithms on the test data” [[26](/articles/10.1186/s40537-020-00369-8#ref-CR26 "Yang H, Bath PA. The use of data mining methods for the prediction of dementia: evidence from the english longitudinal study of aging. IEEE J Biomed Health Inform. 2020;24\(2\):345–53.")]**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/14)

**Table 15 From Yang and Bath [[26](/articles/10.1186/s40537-020-00369-8#ref-CR26 "Yang H, Bath PA. The use of data mining methods for the prediction of dementia: evidence from the english longitudinal study of aging. IEEE J Biomed Health Inform. 2020;24\(2\):345–53.")], “System performance on the test data using different ensemble strategies”**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/15)

“A novel fracture prediction model using machine learning in a community-based cohort”, by Kong et al. is a study on using ML on the task of predicting fragility fractures in patients [[24](/articles/10.1186/s40537-020-00369-8#ref-CR24 "Kong SH, Ahn D, Kim B, Srinivasan K, Ram S, Kim H, Hong AR, Kim JH, Cho NH, Shin CS. A novel fracture prediction model using machine learning in a community-based cohort. JBMR Plus. 2020;4\(3\):1.")]. Fragility fractures are bone fractures that occur from little or no trauma. The authors report that their study uses a cohort of 2227 patients. We assume there is one sample in the dataset per participant, so this is not a study in Big Data. However, we choose to include their study in our survey because it shows how CatBoost can outperform other ML algorithms in tasks involving heterogeneous, categorical data. Assuming the list of clinical characteristics of participants listed in [[24](/articles/10.1186/s40537-020-00369-8#ref-CR24 "Kong SH, Ahn D, Kim B, Srinivasan K, Ram S, Kim H, Hong AR, Kim JH, Cho NH, Shin CS. A novel fracture prediction model using machine learning in a community-based cohort. JBMR Plus. 2020;4\(3\):1.")] [Tab. 1] is the comprehensive list of features, there are 35 features in the dataset, 9 of which we consider to be categorical. However, the authors also report results for models using the top 20 most important features. The authors determine feature importance using Shapley additive explanations (\\(\text {SHAP}\\)) analysis [[67](/articles/10.1186/s40537-020-00369-8#ref-CR67 "Lundberg SM, Lee SI. A unified approach to interpreting model predictions. In: Guyon I, Luxburg UV, Bengio S, Wallach H, Fergus R, Vishwanathan S, Garnett R, editors. Advances in neural information processing systems. New York: Curran Associates; 2017. p. 4765–74.")]. Results show CatBoost outperforms Support Vector Machine (\\(\text {SVM}\\)) and Logistic Regression in the task of identifying participants who will develop fragility fractures. CatBoost outperforms \\(\text {SVM}\\) and Logistic Regression in all experiments. We focus on the key result of predicting all types of fragility fractures, using all features in the cohort data. For this result CatBoost yields an AUC of 0.688, whereas Logistic Regression yields an AUC of 0.614, and \\(\text {SVM}\\) yields an AUC of 0.500. The \\(\text {AUC}\\) that \\(\text {SVM}\\) yields is no better than a model that randomly classifies inputs into categories. This is interesting because in the next study we cover [[23](/articles/10.1186/s40537-020-00369-8#ref-CR23 "Adamović S, Miškovic V, Maček N, Milosavljević M, Šarac M, Saračević M, Gnjatović M. An efficient novel approach for iris recognition based on stylometric features and machine learning techniques. Fut Gener Comput Syst. 2020;107:144–57.")], the authors use data with features that are derived from heterogeneous numerical data. In that study two algorithms related to \\(\text {SVM}\\), Sequential Minimal Optimization (\\(\text {SMO}\\)) (which is the name for the \\(\text {SVM}\\) implementation in the Weka [[68](/articles/10.1186/s40537-020-00369-8#ref-CR68 "Witten IH, Frank E. Data mining: practical machine learning tools and techniques with java implementations. ACM Sigmod Record. 2002;31\(1\):76–7.")] \\(\text {ML}\\) library), and Support Vector Classification (\\(\text {SVC}\\)) [[15](/articles/10.1186/s40537-020-00369-8#ref-CR15 "Ensembles—rdd-based api. 
                  https://spark.apache.org/docs/latest/mllib-ensembles.html
                  
                , 2020.")] yield the best performance in terms of multiple different metrics for one experiment. Therefore, Kong et al. results give further evidence that CatBoost can outperform other \\(\text {ML}\\) algorithms on categorical, heterogeneous data, whereas Adamovic et al. results, that we cover next, show CatBoost falls behind other techniques when homogeneous, numeric data is used.

Adamovic et al. study is titled “An efficient novel approach for iris recognition based on stylometric features and machine learning techniques.” [[23](/articles/10.1186/s40537-020-00369-8#ref-CR23 "Adamović S, Miškovic V, Maček N, Milosavljević M, Šarac M, Saračević M, Gnjatović M. An efficient novel approach for iris recognition based on stylometric features and machine learning techniques. Fut Gener Comput Syst. 2020;107:144–57.")] Stylometry is the study of identifying an author based on the content of his or her work. In their study, stylometry is applied to the Base-64 encoding of iris images as though it were prose, so that identifying the hypothetical author equates to identifying the owner of the iris. For an example of a stylometric feature, from [[23](/articles/10.1186/s40537-020-00369-8#ref-CR23 "Adamović S, Miškovic V, Maček N, Milosavljević M, Šarac M, Saračević M, Gnjatović M. An efficient novel approach for iris recognition based on stylometric features and machine learning techniques. Fut Gener Comput Syst. 2020;107:144–57.")][Tab. 1], we see, “The number of vowels in a text.” We consider Adamovic et al. study of properties of the human iris to be a medical study, for the purpose of biometric identification applications.

Their study’s data processing pipeline converts iris images into samples with all numeric features. They use the Chinese Academy of Sciences Institute of Automation (\\(\text {CASIA}\\)) Iris Image Database Version 4 as the source of images to fit several \\(\text {ML}\\) models. The models used are as follows: from the Weka system, 1R rule learning [[69](/articles/10.1186/s40537-020-00369-8#ref-CR69 "Holte RC. Very simple classification rules perform well on most commonly used datasets. Mach Learn. 1993;11\(1\):63–90.")], C4.5 Decision Tree [[70](/articles/10.1186/s40537-020-00369-8#ref-CR70 "Quinlan JR. C4. 5: Programs for machine learning. 1993.")], \\(\text {SVM}\\) [[71](/articles/10.1186/s40537-020-00369-8#ref-CR71 "Platt J. Sequential minimal optimization: a fast algorithm for training support vector machines. 1998.")] and Multiboost [[72](/articles/10.1186/s40537-020-00369-8#ref-CR72 "Webb GI. Multiboosting: a technique for combining boosting and wagging. Mach Learn. 2000;40\(2\):159–96.")]. Within the Weka program, these models are named OneR, J48, SMO and MultiboostAB, respectively. Another model used is a version of Random Forest [[73](/articles/10.1186/s40537-020-00369-8#ref-CR73 "Breiman L. Random forests. Mach Learn. 2001;45\(1\):5–32.")] from the R package randomForest. From the Python Scikit-learn library, they use the \\(\text {SVC}\\) algorithm. Finally, they also include CatBoost as a model. Adamovic _et al._ report that for handling class imbalance in their experiments, they use \\(\text {SMOTE}\\) [[63](/articles/10.1186/s40537-020-00369-8#ref-CR63 "Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP. synthetic minority over-sampling technique. Smote. 2002;16:321–57.")], and Majority Weighted Minority Over-sampling Technique (\\(\text {MWMOTE}\\)) [[74](/articles/10.1186/s40537-020-00369-8#ref-CR74 "Barua S, Islam MM, Yao X, Murase K. Mwmote-majority weighted minority oversampling technique for imbalanced data set learning. IEEE Trans Knowl Data Eng. 2012;26\(2\):405–25.")]. The exact nature of class imbalance is not clear in their study. Adamovic et al. write that their data has two classes, Class Y, and Class N. Furthermore, Class Y is the class “the same iris” and Class N is “irises of different persons.” Class Y has 450 samples, and Class N has 2,415 samples. The link to the CASIA datasetFootnote 4 containing the iris data is provided, but at the time of this writing, this site is not accessible. Adamovic et al. write that they use the Recursive Feature Elimination (\\(\text {RFE}\\)) [[75](/articles/10.1186/s40537-020-00369-8#ref-CR75 "Guyon I, Weston J, Barnhill S, Vapnik V. Gene selection for cancer classification using support vector machines. Mach Learn. 2002;46\(1–3\):389–422.")] and Regularized Random Forest (\\(\text {RRF}\\)) [[76](/articles/10.1186/s40537-020-00369-8#ref-CR76 "Deng H, Runger G. Gene selection with guided regularized random forest. Pattern Recogn. 2013;46\(12\):3483–9.")] methods for feature extraction. They conduct experiments with a 16 feature dataset, derived with RFE, and an 8 feature dataset they obtain with RRF. In addition, they report conducting experiments with all 62 features. The results Adamovic et al. report are very strong in terms of accuracy, precision, recall, F1 score and \\(\text {AUC}\\), regardless of which feature selection technique they use, or which machine learning algorithm they use. All scores they report are close to the maximum values possible, as can be seen in Table [16](/articles/10.1186/s40537-020-00369-8#Tab16) that we copy from [[23](/articles/10.1186/s40537-020-00369-8#ref-CR23 "Adamović S, Miškovic V, Maček N, Milosavljević M, Šarac M, Saračević M, Gnjatović M. An efficient novel approach for iris recognition based on stylometric features and machine learning techniques. Fut Gener Comput Syst. 2020;107:144–57.")]. We interpret the results in Table [16](/articles/10.1186/s40537-020-00369-8#Tab16) to mean that the stylometric data they derive from iris images is so distinctive that the number of features, and ML classifier they use is not very important. There are clear winners in Table [16](/articles/10.1186/s40537-020-00369-8#Tab16), but margins are close. Another conclusion we draw from the results is that CatBoost yields weaker performance than other classifiers because the data is derived from a homogeneous source, and in [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], Prokhorenkova et al. mention that CatBoost may not perform as well on homogeneous data as other ML algorithms.

**Table 16 From [[23](/articles/10.1186/s40537-020-00369-8#ref-CR23 "Adamović S, Miškovic V, Maček N, Milosavljević M, Šarac M, Saračević M, Gnjatović M. An efficient novel approach for iris recognition based on stylometric features and machine learning techniques. Fut Gener Comput Syst. 2020;107:144–57.")] original caption, “Iris recognition performances on the CASIA dataset, with the cross-validation performed after the over-sampling (SMOTE).”**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/16)

Another example where CatBoost does not appear to do well when pitted against other Gradient Boosted Decision Tree classifiers for \\(\text {ML}\\) tasks where no categorical data is involved is “Performance analysis of boosting classifiers in recognizing activities of daily living”, by Rahman et al. [[25](/articles/10.1186/s40537-020-00369-8#ref-CR25 "Saifur R, Muhammad I, Mohsin R, Khawaja M-G, Shumayla Y, Muhammad A. Performance analysis of boosting classifiers in recognizing activities of daily living. Int J Environ Res Public Health. 2020;17\(3\):1082.")]. In their study, the authors compare CatBoost to XGBoost, LightGBM, AdaBoost, and Gradient Boosting [[77](/articles/10.1186/s40537-020-00369-8#ref-CR77 "Friedman JH. Stochastic gradient boosting. Nonlinear methods and data mining. Comput Stat Data Anal. 2002;38\(4\):367–78.")]. The study documents the performance of these classifiers’ ability to categorize accelerometer and gyroscope sensor data into physical activities of the person using a smart phone. Figure [3](/articles/10.1186/s40537-020-00369-8#Fig3) illustrates the relatively weak performance of CatBoost in comparison to other Gradient Boosted Decision Tree algorithms for this \\(\text {ML}\\) task. The legend in Fig. [3](/articles/10.1186/s40537-020-00369-8#Fig3) explains the two values for F-measure Rahman et al. report each classifier. They report one F-measure score for models trained with all features, and one F-measure score for models trained with “Correlation-based features” (\\(\text {CFS}\\)) [[25](/articles/10.1186/s40537-020-00369-8#ref-CR25 "Saifur R, Muhammad I, Mohsin R, Khawaja M-G, Shumayla Y, Muhammad A. Performance analysis of boosting classifiers in recognizing activities of daily living. Int J Environ Res Public Health. 2020;17\(3\):1082.")] [p. 7]. \\(\text {CFS}\\) is a technique for selecting a subset of features that are not correlated with one and other. What stands out to us about this study is that the data the authors use is purely numerical. The data is homogeneous in the sense that it is related to motion since it is from accelerometers and gyroscopes. Rahman et al. study is evidence one should avoid CatBoost for these types of data.

**Fig. 3**

[![figure 3](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig3_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/3)

Image from [[25](/articles/10.1186/s40537-020-00369-8#ref-CR25 "Saifur R, Muhammad I, Mohsin R, Khawaja M-G, Shumayla Y, Muhammad A. Performance analysis of boosting classifiers in recognizing activities of daily living. Int J Environ Res Public Health. 2020;17\(3\):1082.")] showing relatively weak performance of CatBoost (CB) as compared to XGBoost (XGB), LightGBM (LGBM), Gradient Boosting(GB), AdaBoost using Decision Trees (ADA_DT) and AdaBoost using Random Forest (ADA_RF)

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/3)

In these studies related to medicine, we find one study that supports the idea that CatBoost is a good choice to use when data is heterogeneous and categorical. That study is Kong et al. [[24](/articles/10.1186/s40537-020-00369-8#ref-CR24 "Kong SH, Ahn D, Kim B, Srinivasan K, Ram S, Kim H, Hong AR, Kim JH, Cho NH, Shin CS. A novel fracture prediction model using machine learning in a community-based cohort. JBMR Plus. 2020;4\(3\):1.")], where the results for predicting fragility fractures show CatBoost yields the best performance. One reason for this may be that the dataset is heterogeneous data from surveys that cohort members submit for the study. However, we find another study where the data is categorical and heterogeneous in Yang and Bath [[26](/articles/10.1186/s40537-020-00369-8#ref-CR26 "Yang H, Bath PA. The use of data mining methods for the prediction of dementia: evidence from the english longitudinal study of aging. IEEE J Biomed Health Inform. 2020;24\(2\):345–53.")], where CatBoost does not yield the best performance. There, the performance of CatBoost’s competitors are very close and there may not be a statistically significant difference between them. Finally, we see two studies that support the idea that CatBoost is not the best choice for a classifier for datasets with homogeneous features. In the case of Adamovic et al. even though they use feature extraction from raw image data, CatBoost does not outperform other classifiers. We suspect this is due to the original homogeneous nature of the image data they use. In the case of Rahman et al. the data they use is numerical accelerometer and gyroscope data. For \\(\text {ML}\\) applications in Medicine or other fields, CatBoost appears to be more suitable for data that is tabular, such as patient demographic data, or survey data. In the next section, we look at how researchers use CatBoost to make advances in the field of electrical utilities fraud detection.

### Electrical utilities fraud

Coma and Carmona use \\(\text {ML}\\) techniques for electricity theft detection [[29](/articles/10.1186/s40537-020-00369-8#ref-CR29 "Coma-Puig B, Carmona J. Bridging the gap between energy consumption and distribution through non-technical loss detection. Energies. 2019;12\(9\):1748.")]. In their study the authors report using CatBoost, XGBoost, and LightGBM. The subject of the study is interesting to researchers working with Big Data since it involves applying \\(\text {ML}\\) to detect patterns of fraudulent electricity consumption in large-scale data.

In their study, Coma and Carmona work with data that describes millions of a utilities company’s customers throughout Spain. The authors’ goal is to use \\(\text {ML}\\) algorithms to detect non-technical loss in an electricity providers’ service. Non-technical loss (\\(\text {NTL}\\)) is a loss due to some abnormality in the place where the provider delivers electricity, or fraud. The proposed advantage of using \\(\text {ML}\\) is to save human time and effort in both finding and correcting the causes of abnormal electricity consumption patterns. The authors do not give specific values of metrics they use to detect non-technical loss. They write that they use GBDT algorithms CatBoost, LightGBM, and XGBoost, but they do not supply a detailed comparison of the performance of each algorithm. They report, “In terms of accuracy, the system succeeds in the detection of NTL. In customers without contract, we have achieved very good results, with campaigns higher than 50% of accuracy. In campaigns to detect NTL in customers with contract, the system has reached up to 36% of accuracy.” This is the greatest detail we find on quantitative results on classifier performance in their study.

Another issue we find in this work is that the authors report they discard AUC as a metric for validating models in favor of the Precision-Recall curve. We have no issue with discarding AUC over Precision-Recall curve. Our issue is that Coma and Carmona are inconsistent. The only quantitative data on performance that we find Coma and Carmona reporting in [[29](/articles/10.1186/s40537-020-00369-8#ref-CR29 "Coma-Puig B, Carmona J. Bridging the gap between energy consumption and distribution through non-technical loss detection. Energies. 2019;12\(9\):1748.")] is in our previous quotation of them where they write about the accuracy of their system in terms of \\(\text {AUC}\\). While their study documents an interesting application of CatBoost to a Big Data problem, Coma and Carmona do not provide enough detail for one to draw a conclusion as to which of CatBoost, XGBoost, or LightGBM served them best. In their study the authors list several reasons why they choose GBDT algorithms over other classification techniques. Their study appears to be a report on a work in progress. It is interesting to researchers working in Big Data since the study involves a large database with data on millions of customers. The conclusion we draw from this study is that CatBoost and other popular GBDT algorithms are being researched by utilities companies as a means to do fraud detection. The next work we cover is on the same subject, and provides more detail on learners the authors use.

Another study that provides more detail on the performance of GBDT algorithms for \\(\text {NTL}\\) detection in the electricity utilities industry is, “Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing” by Punmiya and Choe [[31](/articles/10.1186/s40537-020-00369-8#ref-CR31 "Punmiya R, Choe S. Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing. IEEE Trans Smart Grid. 2019;10\(2\):2326–9.")]. Both [[31](/articles/10.1186/s40537-020-00369-8#ref-CR31 "Punmiya R, Choe S. Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing. IEEE Trans Smart Grid. 2019;10\(2\):2326–9.")] and [[29](/articles/10.1186/s40537-020-00369-8#ref-CR29 "Coma-Puig B, Carmona J. Bridging the gap between energy consumption and distribution through non-technical loss detection. Energies. 2019;12\(9\):1748.")] have May 2019 publication dates, which indicates that, for the study of \\(\text {NTL}\\) detection in electricity utilities, there is a trend of using GBDT algorithms.

An important proposal in Punmiya and Choe’s study is a technique for generating samples synthetically. The positive class in their dataset is extremely sparse. Therefore, motivated by a recent study by Buzau et al. [[78](/articles/10.1186/s40537-020-00369-8#ref-CR78 "Madalina-Mihaela B, Javier T-A, Pedro C-R, Antonio G. Detection of non-technical losses using smart meter data and supervised learning. IEEE Trans Smart Grid. 2018;10\(3\):2661–70.")], that shows the strong performance of XGBoost in \\(\text {NTL}\\), Punmiya and Choe compare XGBoost, CatBoost, and LightGBM to an existing consumption pattern-based electricity theft detector (\\(\text {CPBETD}\\)) that is based on Support Vector Machine (\\(\text {SVM}\\)). They compare the performance of these classifiers to detect patterns of theft in electricity usage data from smart grid electricity meters. Punmiya and Choe rely on random number generators to generate values in ranges above those in typical non-theft data. In addition, they test the utility of deriving features based on summary statistics (minimum, maximum, mean, and standard deviation) of daily electricity usage. This is noteworthy because we see the same technique used in previous research by Bauder et al. in the similar task of health insurance fraud detection at Big-Data scale, where they add summary statistics based on treatments and procedures aggregated by healthcare provider and year [[79](/articles/10.1186/s40537-020-00369-8#ref-CR79 "Bauder R, da Rosa R, Khoshgoftaar TM. Identifying medicare provider fraud with unsupervised machine learning. In: 2018 IEEE international conference on information Reuse and integration \(IRI\).")]. Like Punmiya and Choe, Bauder et al. work with an imbalanced dataset. The efficacy of including summary statistics may only be specific to Punmiya et al. and Bauder _et al._ ’s experiments. There is an opportunity for future research to determine how adding summary statistics may improve a classifier’s performance. Punmiya and Choe find that Gradient Boosted Decision Tree algorithms provide lower false positive and higher true positive rates in their experiments when compared with \\(\text {CPBETD}\\). We interpret the results Punmiya and Choe report as suggestions for handling imbalanced data for use with Gradient Boosted Decision Tree algorithms such as CatBoost. The suggestions are: generate positive class samples synthetically by generating fake observations with features that have values in ranges that could only belong to the positive class if such a sample did exist, and augment features with summary statistics of other features. Punmiya and Choe show the lower false positive rates and higher true negative rates when they employ summary statistics in a table of results we include in Table [17](/articles/10.1186/s40537-020-00369-8#Tab17). They also show that CatBoost has the lowest false positive rate, but the longest total train and test time, in the charts that we include copies of in Figs. [4](/articles/10.1186/s40537-020-00369-8#Fig4) and [5](/articles/10.1186/s40537-020-00369-8#Fig5), respectively. In Punmiya and Choe’s work, we find techniques that are useful for fraud detection that are applicable at Big Data scales. As we shall see in the next work, we cover more applications of GBDT techniques for \\(\text {NTL}\\) detection in the electrical utilities industry.

**Table 17 From [[31](/articles/10.1186/s40537-020-00369-8#ref-CR31 "Punmiya R, Choe S. Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing. IEEE Trans Smart Grid. 2019;10\(2\):2326–9.")], “Performance comparison without or with new feature(s) (average of 100 random customers), where revised theft cases are used**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/17)

**Fig. 4**

[![figure 4](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig4_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/4)

From [[31](/articles/10.1186/s40537-020-00369-8#ref-CR31 "Punmiya R, Choe S. Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing. IEEE Trans Smart Grid. 2019;10\(2\):2326–9.")]; false positive rates for XGBoost, CatBoost, and LightGBM as number of features used increases

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/4)

**Fig. 5**

[![figure 5](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig5_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/5)

From [[31](/articles/10.1186/s40537-020-00369-8#ref-CR31 "Punmiya R, Choe S. Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing. IEEE Trans Smart Grid. 2019;10\(2\):2326–9.")]; Evaluation (total train and test) time for XGBoost, CatBoost, and LightGBM as number of features increases, average of 100 random customers; shows improvement in CatBoost false positive rate when all summary statistics are employed

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/5)

A third study on \\(\text {NTL}\\) in electrical utilities is “Impact of feature selection on non-technical loss detection” by Ghori et al. [[30](/articles/10.1186/s40537-020-00369-8#ref-CR30 "Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications \(CDMA\). 2020; p 19–24.")]. In their study, they propose the Incremental Feature Selection (\\(\text {IFS}\\)) technique for \\(\text {NTL}\\) detection. For details on \\(\text {IFS}\\) please see [[30](/articles/10.1186/s40537-020-00369-8#ref-CR30 "Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications \(CDMA\). 2020; p 19–24."), Algorithm 1]. Ghori et al. do not compare \\(\text {IFS}\\) to other feature selection techniques, so its relative efficacy remains to be seen. Hence, a study to evaluate feature selection techniques for classifiers on the task of \\(\text {NTL}\\) is an opportunity for future research.

In their study, Ghori et al. document experiments where they compare CatBoost, Decision Tree (\\(\text {DT}\\)), and K-Nearest neighbors (\\(\text {KNN}\\)) on the task of detecting \\(\text {NTL}\\) in a specific dataset that they apply \\(\text {IFS}\\) to. The dataset they use consists of electricity consumption information from 80,244 customers over 15 months, with 112 features total. Of the 112 features, they find that only 71 are useful. Ghori et al. report that in their experiments CatBoost outperforms KNN and DT for a full feature set of 71 features in terms of precision, recall and F-measure. CatBoost also outperforms KNN and DT in terms of precision, recall, and F-measure with a reduced set of 9 features obtained with \\(\text {IFS}\\), except for KNN, which has a higher recall than CatBoost for the reduced feature set. They also point out that, as one would expect, CatBoost has a lower training time when they use a dataset with 9 features. As we see in Table [18](/articles/10.1186/s40537-020-00369-8#Tab18), CatBoost’s performance suffers with the reduced dataset, but one can use \\(\text {IFS}\\) to trade some performance for training time.

Ghori et al. do not use any technique to balance the class ratio in their data, but they ensure their training and test dataset have the same class ratio. The class imbalance ratio is 96% class, and 4% positive. We include a copy of a table of results from [[30](/articles/10.1186/s40537-020-00369-8#ref-CR30 "Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications \(CDMA\). 2020; p 19–24.")] that shows the relative performance of CatBoost, \\(\text {DT}\\) and \\(\text {KNN}\\) with the number of features (9 or 71) as a factor in Table [18](/articles/10.1186/s40537-020-00369-8#Tab18).

**Table 18 From [[30](/articles/10.1186/s40537-020-00369-8#ref-CR30 "Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications \(CDMA\). 2020; p 19–24.")], “Precision , recall and F-measure of CatBoost, Decision Tree classifier and KNN for 9 and 71 features”**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/18)

Ghori et al. study [[30](/articles/10.1186/s40537-020-00369-8#ref-CR30 "Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications \(CDMA\). 2020; p 19–24.")] was published as a part of the 6th International Conference on Data Science and Machine Learning Applications. Apparently they were expanding this work for “Performance Analysis of Different Types of Machine Learning Classifiers for Non-Technical Loss Detection” [[52](/articles/10.1186/s40537-020-00369-8#ref-CR52 "Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48.")] that appeared in the Journal “IEEE Access” around the same time that [[30](/articles/10.1186/s40537-020-00369-8#ref-CR30 "Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications \(CDMA\). 2020; p 19–24.")] was published. Both studies have the same authors, and the data descriptions in both studies indicate they use similar data. In [[52](/articles/10.1186/s40537-020-00369-8#ref-CR52 "Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48.")], the authors augment the collection of classifiers they use to include an Artificial Neural Network (\\(\text {ANN}\\)). Interestingly, we find a description of a process similar to \\(\text {IFS}\\) in [[52](/articles/10.1186/s40537-020-00369-8#ref-CR52 "Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48.")], but it is not referred to as such. However, in [[52](/articles/10.1186/s40537-020-00369-8#ref-CR52 "Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48.")] the authors report finding 14 useful features after applying feature selection, whereas in [[30](/articles/10.1186/s40537-020-00369-8#ref-CR30 "Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications \(CDMA\). 2020; p 19–24.")] the authors report finding 9 useful features. The results in [[52](/articles/10.1186/s40537-020-00369-8#ref-CR52 "Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48."), Tab. 5], comparing the performance of classifiers used in the study, show that CatBoost outperforms other learners in terms of precision and F-measure, but not recall. The same table shows that the algorithm that yeilds the best performance in terms of recall is \\(\text {ANN}\\). However, Ghori et al. list all features of their dataset in [[52](/articles/10.1186/s40537-020-00369-8#ref-CR52 "Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48.")] [Tab. 6]. We find at least three features, “Type-Premise”, “Type-Bill” and “Type-Consumer” that are categorical. They have definitions “House hold type like house, flats, market etc.”, “Type of bill” and “Connection type”, respectively. Moreover, in [[52](/articles/10.1186/s40537-020-00369-8#ref-CR52 "Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48.")] [Tab. 7] the authors give lists of hyper-parameters they use, but they do not indicate they set CatBoost’s “cat_features” hyper-parameter. Therefore we cannot conclude that Ghori et al. took maximum advantage of CatBoost’s Ordered Target Statistics encoding for all categorical features in their dataset.

Our search for studies involving CatBoost reveals that researchers are interested in using it for \\(\text {NTL}\\) detection in electrical utilities markets. Coma and Carmona’s contribution of using the SHAP importance for selecting features in their dataset appears to be an earlier publication of an idea that Ghori et al. refine with \\(\text {IFS}\\). Furthermore Ghori et al. expand their investigation into \\(\text {NTL}\\), showing best results for CatBoost in terms of precision and F-measure, but not recall. Punmiya and Choe make a contribution by showing the performance of CatBoost on imbalanced datasets can be improved with the introduction of synthetic data, and the addition of new features from summary statistics of existing features. Ghori et al. propose \\(\text {IFS}\\) for feature selection, but do not compare it against other feature selection techniques. Their results of their classifiers’ performance in terms of accuracy and running time show that one may use \\(\text {IFS}\\) to tune feature set size to trade performance in terms of precision, recall, or F-measure for performance in terms of computation time. These studies show CatBoost is a useful tool for \\(\text {NTL}\\) detection in the electrical utilities industry, with possible applications in fraud detection in other markets. Given the success of other \\(\text {DT}\\) based classifiers for fraud detection [80,81,[82](/articles/10.1186/s40537-020-00369-8#ref-CR82 "Hancock J, Khoshgoftaar TM. Performance of catboost and xgboost in medicare fraud detection. In: 19th IEEE international conference on machine learning and applications \(ICMLA\); IEEE, New York. 2020.")], we see opportunities for applying CatBoost to more fraud detection tasks. In the next section, we take a look at how researchers are using CatBoost to study the weather.

### Meteorology

The first meteorology-related work we cover in the database is “Short-term weather forecast based on wavelet denoising and CatBoost” by Diao et al. [[51](/articles/10.1186/s40537-020-00369-8#ref-CR51 "Diao L, Niu D, Zang Z, Chen C. Short-term weather forecast based on wavelet denoising and catboost. In: 2019 Chinese control conference \(CCC\). 2019; pp. 3760–4.")]. In this study the authors cite the inaugural CatBoost paper [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], by Prokhorenkova et al. as their justification that CatBoost is the superior boosted Decision Tree algorithm. They also mention training times for neural network based solutions are longer than Decision Tree based solutions. This is another motivation Diao et al. have for trying CatBoost. The data that the authors use in the study initially has 38 features. Before feeding the data into CatBoost for regression, the authors apply feature selection by Recursive Feature Elimination (\\(\text {RFE}\\)), thus eliminating features with low correlation to the target value, then use some unspecified combination of the feature importance ranking functions built into CatBoost and XGBoost. The final group of features the authors use is not clear in their publication. They provide a table of the least important features, but it is not obvious what the features listed in the table have to do with the features they use in the study. The table is entitled “The Least Important Features,” so one surmises that perhaps they are eliminated during feature selection. After employing these three initial feature selection techniques, Diao et al. write that they use spatio-temporal feature extraction to enhance qualitative features such as temperature, humidity, and wind speed. However, they only discuss a technique for transforming temporal features: month, day of the month and hour, to two-dimensional values, so what we can surmise from the information they provide is that they only perform temporal feature extraction. Diao et al. provide a fair amount of detail on the Wavelet Denoising technique they use to smooth values in the features they select. For results, Diao et al. report scores that are calculated based on root mean square error (\\(\text {RSME}\\)) of values they forecast, and the RMAPS-based \\(\text {RMSE}\\) that is not clearly defined. Diao et al. mention they use data from the “weather forecast track in 2018 AI Challenger Global AI Contest” but we do not find a reference for that contest to find out more about RMAPS-based \\(\text {RSME}\\). The formula they give for a score is:

$$\begin{aligned} \text {Score} = \frac{RSME\left( \text {RMAPS}\right) - RSME\left( \text {forecast}\right) }{RSME\left( \text {RMAPS}\right) } \end{aligned}$$

(9) 

We give Diao et al. the benefit of the doubt and assume that the scores they report for models are such that higher scores indicate lower \\(\text {RMSE}\\) of their forecast. In the results Diao et al. report, CatBoost outperforms Random Forest [[73](/articles/10.1186/s40537-020-00369-8#ref-CR73 "Breiman L. Random forests. Mach Learn. 2001;45\(1\):5–32.")], Long Short-term Memory (\\(\text {LSTM}\\)) [[83](/articles/10.1186/s40537-020-00369-8#ref-CR83 "Hochreiter S, Schmidhuber J. Lstm can solve hard long time lag problems. In: Advances in neural information processing systems. 1997; pp. 473–9.")], and Seq2Seq [[84](/articles/10.1186/s40537-020-00369-8#ref-CR84 "Ilya S, Oriol V, Le Quoc V. Sequence to sequence learning with neural networks. Advances in neural information processing systems. 2014; pp. 3104–3112.")]. We include this study in our survey since it shows CatBoost may work well for regression tasks when used in conjunction with Wavelet Denoising.

“Evaluation of catboost method for prediction of reference evapotranspiration in humid regions” by Huang et al.is a more robust study on meteorological applications of CatBoost [[33](/articles/10.1186/s40537-020-00369-8#ref-CR33 "Huang G, Lifeng W, Ma X, Zhang W, Fan J, Xiang Y, Zeng W, Zhou H. Evaluation of catboost method for prediction of reference evapotranspiration in humid regions. J Hydrol. 2019;574:1029–41.")]. The principal aim of the study is to use \\(\text {ML}\\) regression models to forecast water evapotranspiration (\\(\text {ET}\\)). Huang et al. define \\(\text {ET}\\) as, “The loss of water from the ground and vegetation into the atmosphere, composed of evaporation from ground and vegetation surfaces plus transpiration through vegetation.” Accurate estimates of \\(\text {ET}\\) are important for water resource planning. Huang et al. report on the performance, in terms of \\(\text {RMSE}\\), mean absolute percentage error (\\(\text {MAPE}\\)) [[85](/articles/10.1186/s40537-020-00369-8#ref-CR85 "De Myttenaere A, Golden B, Le Grand B, Rossi F. Mean absolute percentage error for regression models. Neurocomputing. 2016;192:38–48.")], MBE, and \\(R^2\\) [[86](/articles/10.1186/s40537-020-00369-8#ref-CR86 "Nakagawa Shinichi, Schielzeth Holger. A general and simple method for obtaining r2 from generalized linear mixed-effects models. Methods Ecol Evol. 2013;4\(2\):133–42.")] of CatBoost, Vector Machine (\\(\text {SVM}\\)) [[87](/articles/10.1186/s40537-020-00369-8#ref-CR87 "Cortes C, Vapnik V. Support-vector networks. Mach Learn. 1995;20\(3\):273–97.")] and Random Forest (\\(\text {RF}\\)) [[73](/articles/10.1186/s40537-020-00369-8#ref-CR73 "Breiman L. Random forests. Mach Learn. 2001;45\(1\):5–32.")]. The error of the regression models is calculated relative to a reference value of \\(\text {ET}\\), which they provide a formula for. In their experiments, the authors use data from 12 weather stations in Southeastern China. The raw data from the weather stations contains 5 features: daily solar radiation (\\(R_S\\)), maximum (\\(T_{max}\\)) and minimum (\\(T_{min}\\)) air temperatures at 2 m height, relative humidity (\\(H_r\\)), and wind speed (_U_) at 2 m height. As part of their experimental design the authors test performance of models with all 5 features, and 7 different subsets of the 5 features. Huang et al. do not report if they employ any well-known techniques to determine feature importance. We note what appears to be a minor typographical error in the definition of \\(\text {MAPE}\\) that Huang et al. supply:

$$\begin{aligned} \text {MAPE} =\frac{1}{n}\sum _{i=1}^n \frac{Y_{i,m}-Y_{i,e}}{Y_{i,m}} \end{aligned}$$

(10) 

According to de Myttenaere et al. definition of absolute percentage error [[85](/articles/10.1186/s40537-020-00369-8#ref-CR85 "De Myttenaere A, Golden B, Le Grand B, Rossi F. Mean absolute percentage error for regression models. Neurocomputing. 2016;192:38–48.")], in Huang et al. notation the definition of MAPE should be:

$$\begin{aligned} \text {MAPE} =\frac{1}{n}\sum _{i=1}^n \frac{\left| Y_{i,m}-Y_{i,e}\right| }{\left| Y_{i,m}\right| } \end{aligned}$$

(11) 

where \\(Y_{i,e}\\) is the estimated value and \\(Y_{i,m}\\) is the measured (actual) value. According to Google Scholar, at the time of this writing, de Myttenaere et al. [[85](/articles/10.1186/s40537-020-00369-8#ref-CR85 "De Myttenaere A, Golden B, Le Grand B, Rossi F. Mean absolute percentage error for regression models. Neurocomputing. 2016;192:38–48.")] has 185 references. This lends credibility to the claim that their definition of absolute percentage error is widely accepted. We do not find that Huang et al. provide a citation for their definition of MAPE, so we cannot validate whether it is widely accepted, and therefore conclude it is a typographical error. Otherwise, one may choose to ignore results on performance in terms of MAPE for the regression models. Huang et al. also do not provide a reference or definition of the acronym MBE, but they provide a formula for it. This formula indicates MBE is simply the mean value of the difference of estimated and measured values:

$$\begin{aligned} \text {MBE}=\frac{1}{n}\sum _{i=1}^n \left( Y_{i,m} - Y_{i,e}\right) \end{aligned}$$

(12) 

The authors report that CatBoost works best when inputs have no missing values, but that \\(\text {SVM}\\) outperforms CatBoost when inputs have missing values. In the context of their study, the term “missing values” means features removed from their dataset. However, the most interesting result from a Big Data perspective is the comparison that Huang et al. make between the running times and memory usage of CatBoost, \\(\text {SVM}\\) and \\(\text {RF}\\). A copy of bar charts from [[33](/articles/10.1186/s40537-020-00369-8#ref-CR33 "Huang G, Lifeng W, Ma X, Zhang W, Fan J, Xiang Y, Zeng W, Zhou H. Evaluation of catboost method for prediction of reference evapotranspiration in humid regions. J Hydrol. 2019;574:1029–41.")] in Fig. [6](/articles/10.1186/s40537-020-00369-8#Fig6) shows CatBoost consumes less time and less memory than its competitors. The time and memory usage reported in Fig. [6](/articles/10.1186/s40537-020-00369-8#Fig6) is measured for different levels of data, where the level corresponds to the size of the dataset. If resource consumption is the primary concern, the results in Fig. [6](/articles/10.1186/s40537-020-00369-8#Fig6) suggest one should select CatBoost when choosing a Gradient Boosted tree ensemble algorithm. However, we do not see where Huang et al. include hyper-parameter settings for the models they evaluate, so one cannot verify that they did not use settings that would result in unnecessary resource consumption.

**Fig. 6**

[![figure 6](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig6_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/6)

Image from [[33](/articles/10.1186/s40537-020-00369-8#ref-CR33 "Huang G, Lifeng W, Ma X, Zhang W, Fan J, Xiang Y, Zeng W, Zhou H. Evaluation of catboost method for prediction of reference evapotranspiration in humid regions. J Hydrol. 2019;574:1029–41.")] illustrating the relative efficiency of CatBoost, according to Huang et al. Level 1 is 10 years’ data from a single station, Level 2 is 10 years’ data from 12 stations, Level 3 is 20 years’ data from 12 stations, Level 4 is 30 years’ data from 12 stations and Level 5 is 40 years’ data from 12 stations

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/6)

Another study related to predicting weather-related phenomena with CatBoost is “Predicting daily diffuse horizontal solar radiation in various climatic regions of China using support vector machine and tree-based soft computing models with local and extrinsic climatic data” [[32](/articles/10.1186/s40537-020-00369-8#ref-CR32 "Fan Junliang, Wang Xiukang, Zhang Fucang, Ma Xin, Lifeng Wu. Predicting daily diffuse horizontal solar radiation in various climatic regions of china using support vector machine and tree-based soft computing models with local and extrinsic climatic data. J Clean Prod. 2020;248:119264.")], by Fan et al. This study examines the performance of different algorithms for predicting the total amount of solar radiation that reaches the Earth. Fan et al. cite previous studies that show \\(\text {SVM}\\) outperforms some neural network based approaches. For more background on neural networks, please see [[88](/articles/10.1186/s40537-020-00369-8#ref-CR88 "Goodfellow I, Bengio Y, Courville A. Deep learning. New York: MIT Press; 2016. 
                  http://www.deeplearningbook.org
                  
                .")]. Fan _et al._ compare several Decision Tree based algorithms to \\(\text {SVM}\\). The conclusion that Fan et al. make in this study is that CatBoost is nearly as accurate as \\(\text {SVM}\\), but has running times that are lower than \\(\text {SVM}\\)’s. This confirms Huang _et al._ ’s findings we report above. The results of two of their experiments show that CatBoost runs about 1.9 times as fast as \\(\text {SVM}\\). In a third experiment they find that CatBoost is 33.9 times faster than \\(\text {SVM}\\). Therefore, this result is interesting to researchers working with Big Data, since CatBoost could provide a noticeable reduction in processing time for long-running jobs. Another interesting point about the study is that Fan _et al._ report that they used a Grid Search hyper-parameter optimization technique for the learners they compare. This is the second instance where we find CatBoost is reported to be the best performing learner when the authors also report using a hyper-parameter tuning technique. The first instance is in [[20](/articles/10.1186/s40537-020-00369-8#ref-CR20 "Yufei Xia, Lingyun He, Yinguo Li, Nana Liu, Yanlin Ding. Predicting loan default in peer-to-peer lending using narrative data. J Forecasting. 2020;39\(2\):260.")] that we cover earlier.

The studies on applications of CatBoost to Meteorology that we find here show two things. The first is that the CatBoost regression variant is a viable candidate for forecasting weather-related data. The data that Huang et al. and Fan _et al._ report on using seems heterogeneous since they are measurements of different types of climatic data. Diao et al. do not provide quite enough detail on their data for us to be certain about its degree of homogeneity. The second is that CatBoost has better running times than \\(\text {SVM}\\) for weather-related regression problems. A comparative complexity analysis of \\(\text {SVM}\\) and CatBoost is outside the scope of this study. Please see Appendix C of [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")] for a complexity analysis of CatBoost. Fan et al. may have obtained this finding because they employ a hyper-parameter optimization technique. Next, we cover applications of CatBoost in the field of Psychology.

### Psychology

One example where CatBoost as a classifier outperforms other classifiers is “Screening of anxiety and depression among the seafarers using machine learning technology” by Sau and Bhakta [[35](/articles/10.1186/s40537-020-00369-8#ref-CR35 "Arkaprabha S, Ishita B. Screening of anxiety and depression among the seafarers using machine learning technology. Inform Med Unlocked. 2019;16:100149.")]. In this study CatBoost outperforms Random Forest, Logistic Regression, Naïve Bayes, and Support Vector Machine classifiers in the task of identifying individuals that suffer from anxiety or depression. It is important to note that the raw data the authors use in this study is from a survey where they treat the answers to the survey as features. Eight out of fourteen of the features from the survey are categorical values. This helps explain why CatBoost is the best performing classifier for the machine learning task in [[35](/articles/10.1186/s40537-020-00369-8#ref-CR35 "Arkaprabha S, Ishita B. Screening of anxiety and depression among the seafarers using machine learning technology. Inform Med Unlocked. 2019;16:100149.")]. The authors write, “Five machine learning classifiers (Logistic Regression, Naïve Bayes, Random Forest, Support Vector Machine and Catboost), those [_sic_]can handle the binary outcome variable (labels) with mixture of categorical and continuous features, are selected for comparison purpose.” So, it appears that the authors take advantage of built-in support for encoding categorical features in all the learners they use. These results may be an indication that CatBoost has better support for encoding categorical features. The authors also report hyper-parameter settings they use for each learner. This could make the study a good starting point for research into CatBoost’s sensitivity to hyper-parameter settings since the settings are documented.

Another study in the Psychology domain that uses CatBoost is “Machine learning identifies the dynamics and influencing factors in an auditory category learning experiment” [[34](/articles/10.1186/s40537-020-00369-8#ref-CR34 "Abolfazli A, Brechmann A, Wolff S, Spiliopoulou M. Machine learning identifies the dynamics and influencing factors in an auditory category learning experiment. Sci Rep. 2020;10\(1\):1.")], by Abolfazli et al. The study is an investigation into the ability of humans to categorize sounds. Hence, experiments in the study involve playing sounds for the subjects and asking them to identify which category the sound belongs to. The authors list three specific goals in the study: (1) gain insight into how humans learn to categorize sounds, (2) detect when subjects are near the limit of their capacity to learn new categories of sounds and (3) determine whether subjects will be able to learn a new category of sound. Abolfazli et al. state that their motivation for the third goal is to prevent fatigue in test subjects. Their study is fascinating because it is an example of how to use machine learning to better understand human learning. However, we see an opportunity for further research since the authors do not compare the performance of CatBoost to other \\(\text {ML}\\) algorithms on their \\(\text {ML}\\) task. The task in Abolfazli et al. experiments is to estimate whether a person will learn to classify types of sounds given the person’s performance so far.

The technique Abolfazli et al. use for feature engineering is interesting because it could be part of an experimental design for other experiments with the goal of predicting humans’ ability to learn. They measure the true positive rate and false positive rate of the test subjects’ classifications of sounds in blocks of 40 trials, and use these scores as features for a CatBoost \\(\text {ML}\\) model. Please see [[34](/articles/10.1186/s40537-020-00369-8#ref-CR34 "Abolfazli A, Brechmann A, Wolff S, Spiliopoulou M. Machine learning identifies the dynamics and influencing factors in an auditory category learning experiment. Sci Rep. 2020;10\(1\):1.")] [Tab. 1] for more details on these features. The subjects’ performance over the duration of the experiment makes a time series. In [[34](/articles/10.1186/s40537-020-00369-8#ref-CR34 "Abolfazli A, Brechmann A, Wolff S, Spiliopoulou M. Machine learning identifies the dynamics and influencing factors in an auditory category learning experiment. Sci Rep. 2020;10\(1\):1.")] [Tab. 2] Abolfazli et al. report the progressive increase in the balanced accuracy [[89](/articles/10.1186/s40537-020-00369-8#ref-CR89 "Brodersen KH, Ong CS, Stephan KE, Buhmann JM. The balanced accuracy and its posterior distribution. In: 2010 20th international conference on pattern recognition. 2010; pp. 3121–4.")] scores CatBoost yields as they increase the amount of data they use as input to CatBoost. This result shows CatBoost’s ability to predict whether a subject will learn to classify sound categories before the end of the experiment.

The two studies we find involving CatBoost and Psychology cast CatBoost in a positive light. In the first case of Sau and Bhakta [[35](/articles/10.1186/s40537-020-00369-8#ref-CR35 "Arkaprabha S, Ishita B. Screening of anxiety and depression among the seafarers using machine learning technology. Inform Med Unlocked. 2019;16:100149.")], the learner does well, perhaps because the data are survey data that are categorical and heterogeneous. However, in the second study by Abolfazli et al. [[34](/articles/10.1186/s40537-020-00369-8#ref-CR34 "Abolfazli A, Brechmann A, Wolff S, Spiliopoulou M. Machine learning identifies the dynamics and influencing factors in an auditory category learning experiment. Sci Rep. 2020;10\(1\):1.")], the data are classification error rates of the test subjects, that are acting as classifiers during testing. Therefore, it may be the case that another learner would do better if used in the same experiment. Now we pivot from Psychology to the subject of Traffic Engineering. To get started on that subject we take a look at a study on identifying driving style.

### Traffic Engineering

We find one study related to identifying driving style. This study falls under the category of research with a likely application to self-driving automobiles. One interesting aspect of the study is that it is an application of CatBoost for semi-supervised learning. This study is titled “A semi-supervised tri-catboost method for driving style recognition” by Liu et al. [[36](/articles/10.1186/s40537-020-00369-8#ref-CR36 "Liu W, Deng K, Zhang X, Cheng Y, Zheng Z, Jiang F, Peng J. A semi-supervised tri-catboost method for driving style recognition. Symmetry. 2020;3:336.")]. In this article the authors propose the Tri-CatBoost method for labeling data. This method leverages labeled data to impute labels for unlabeled data. Tri-Catboost employs three CatBoost classifiers that are trained on Bootstrap samples of labeled data. After training, Tri-CatBoost begins an iterative process that involves tentatively labeling data and updating the three models. Liu et al. refer to this as the “minority obeying majority” strategy. The minority obeying majority strategy involves iteratively training one CatBoost classifier on data labeled by other CatBoost classifiers. Iterations continue until the classifiers are in agreement on labels they are generating, and all the classifiers have stable error rates when re-evaluated on the labeled data. An opportunity for future research is in the domain of mitigating class noise. One could employ the Tri-CatBoost method, using samples of labeled data where one is confident that the samples have little to no class noise, and treat samples of data with class noise as unlabeled data. One could then take the resulting labels that Tri-CatBoost imputes for the data with class noise as a dataset cleansed of class noise.

Another application of CatBoost in the field of Traffic Engineering is “Accurate classification for automatic vehicle-type recognition based on ensemble classifiers” by Shvai et al. [[90](/articles/10.1186/s40537-020-00369-8#ref-CR90 "Shvai N, Hasnat A, Meicler A, Nakib A. Accurate classification for automatic vehicle-type recognition based on ensemble classifiers. IEEE Trans Intell Transportation Syst. 2020;21\(3\):1288–97.")]. The authors cover an interesting ensemble technique that involves Convolutional Neural Networks (\\(\text {CNN}\\)) [[91](/articles/10.1186/s40537-020-00369-8#ref-CR91 "Lecun Y, Bottou L, Bengio Y, Haffner P. Gradient-based learning applied to document recognition. Proc IEEE. 1998;86\(11\):2278–324.")], Optical Sensors (\\(\text {OS}\\)), and CatBoost. Shvai _et al._ ’s description of OS’s indicates that they are devices that measure the height and number of axles on a vehicle to return a categorical output value for the vehicle type. The output of the CNN and OS are combined into a vector, which becomes the input to CatBoost. We include a copy of the architecture diagram in Fig. [7](/articles/10.1186/s40537-020-00369-8#Fig7). Shvai et al. design has the practical application of automated toll collection. The system is an example of how GDBT’s work well with heterogeneous data; since, in their architecture CatBoost takes data of two completely different types. Shvai et al. report that they experimented with substituting different classifiers in place of CatBoost, but they get the best performance in terms of accuracy with the system as depicted in Fig. [7](/articles/10.1186/s40537-020-00369-8#Fig7) with CatBoost. The accuracy of this system in the task of vehicle type identification is 99.03, which is an impressive improvement over the performance of OS’s that they report as 52.77.

**Fig. 7**

[![figure 7](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig7_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/7)

Image from [[90](/articles/10.1186/s40537-020-00369-8#ref-CR90 "Shvai N, Hasnat A, Meicler A, Nakib A. Accurate classification for automatic vehicle-type recognition based on ensemble classifiers. IEEE Trans Intell Transportation Syst. 2020;21\(3\):1288–97.")] depicting ensemble architecture of system for automatic vehicle detection; CNN and OS output are fed to CatBoost

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/7)

A third study we find that is related to Traffic Engineering has to do with the movement of people between urban centers. In “Reconstructing commuters network using machine learning and urban indicators” [[7](/articles/10.1186/s40537-020-00369-8#ref-CR7 "Spadon Gabriel, de Carvalho Andre C P L F, Rodrigues-Jr Jose F, Alves Luiz G A. Reconstructing commuters network using machine learning and urban indicators. Scientific Reports. 2019;9\(1\):N.PAG.")], Spadon et al. report that they choose XGBoost over CatBoost for their study because CatBoost and XGBoost have nearly equivalent performance in terms of accuracy, but XGBoost is about fifty times faster per training iteration than CatBoost. One should not jump to the conclusion that XGBoost is better suited to Big Data problems based on what Spadon et al. report on the relative running times of XGBoost and CatBoost, since Prokhorenkova et al. present opposing results in [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")]. Prokhorenkova et al. write that CatBoost’s mean tree construction time is about 4 times faster than XGBoost. One iteration of a \\(\text {GBDT}\\) algorithm is the construction of a Decision Tree, so it would behoove us to know the root cause of the discrepancy in running times that Spadon et al. and Prokhorenkova et al. report. To be clear about Prokhorenkova et al. claims about CatBoost’s and XGBoost’s running time performance, we include a copy of a table from Appendix C.2 of “CatBoost: unbiased boosting with categorical features,” in Table [19](/articles/10.1186/s40537-020-00369-8#Tab19). The results in Table [19](/articles/10.1186/s40537-020-00369-8#Tab19) are for running CatBoost on the Epsilon dataset, whereas Spadon et al. training time results are on a dataset they derived from Brazilian census data. The Epsilon dataset has 2,000 features whereas the dataset from Spadon et al. appears to have a much larger number of features. It is not clear from Spadon et al. paper exactly how many features their dataset has, but it could be a sparse dataset with thousands of features since they model their data as a graph with 5,565 vertices, and they indicate that the weights of edges in the graph form some features in their dataset. Since there are thousands of vertices, each vertex has thousands of edges incident to it. We know the value of most edge weights is zero since Spadon et al. report that 55,247 of the edges have non-zero weights. In addition, Spadon et al. document that they use 22 additional features for each city from the Brazilian census data. Therefore, the Epsilon dataset, and the dataset from Spadon et al. have a dissimilar number of features. This may account for the difference in training performance that Spadon et al. and Prokhorenkova _et al._ report.

**Table 19 From [[2](/articles/10.1186/s40537-020-00369-8#ref-CR2 "Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, 2018; pages 6638–6648. Curran Associates, Inc.")], showing the mean tree construction time in seconds**

[Full size table](/articles/10.1186/s40537-020-00369-8/tables/19)

In the field of Traffic Engineering, we see researchers have applied CatBoost to very different problems. However, the first study [[36](/articles/10.1186/s40537-020-00369-8#ref-CR36 "Liu W, Deng K, Zhang X, Cheng Y, Zheng Z, Jiang F, Peng J. A semi-supervised tri-catboost method for driving style recognition. Symmetry. 2020;3:336.")], by Liu et al. is interesting in terms of the new semi-supervised technique presented in it. The second study [[90](/articles/10.1186/s40537-020-00369-8#ref-CR90 "Shvai N, Hasnat A, Meicler A, Nakib A. Accurate classification for automatic vehicle-type recognition based on ensemble classifiers. IEEE Trans Intell Transportation Syst. 2020;21\(3\):1288–97.")] we cover by Shvai _et al._ shows positive results for CatBoost, and we feel one reason for that is the heterogeneous nature of the data they use in the study. Finally, Spadon et al. [[7](/articles/10.1186/s40537-020-00369-8#ref-CR7 "Spadon Gabriel, de Carvalho Andre C P L F, Rodrigues-Jr Jose F, Alves Luiz G A. Reconstructing commuters network using machine learning and urban indicators. Scientific Reports. 2019;9\(1\):N.PAG.")] apply CatBoost to a graph-related problem, and we find only two such graph-related studies, the other being [[38](/articles/10.1186/s40537-020-00369-8#ref-CR38 "Yi Hai-Cheng, You Zhu-Hong, Guo Zhen-Hao. Construction and analysis of molecular association network by combining behavior representation and node attributes. Front Genetics. 2019;10:1.")], by Yi et al. While Spadon et al. reject CatBoost for efficiency reasons, it could be worthwhile to investigate whether hyper-parameter optimization would result in improved efficiency for CatBoost. In the next section, we transition from the subject of traffic, to one related to network traffic, and Cyber-security.

### Cyber-security

Detection of computer network attacks is in the domain of Big Data, and fast detection times are important for two reasons. First of all, consumers demand low latency internet service for applications such as gaming, high frequency trading, voice communications, and so on. At the same time, if a system in one’s network is under attack, one would like to know that as soon as possible. Attack detection may introduce latency, so, there is a trade-off between performance and security. One recent study where the authors employ CatBoost to detect attacks is “Attack detection in enterprise networks by machine learning methods” [[37](/articles/10.1186/s40537-020-00369-8#ref-CR37 "Bakhareva N, Shukhman A, Matveev A, Polezhaev P, Ushakov Y, Legashev L. Attack detection in enterprise networks by machine learning methods. In: 2019 international Russian automation conference \(RusAutoCon\). 2019; pages 1–6.")], by Bakhareva et al. Here, the authors find that CatBoost outperforms LightGBM, Linear Support Vector Machine Classifier, and Logistic Regression, in terms of cross validation balanced accuracy, balanced accuracy, F1 score, precision, recall, and \\(\text {AUC}\\). However, they also report that CatBoost has longer training and prediction times. The authors report mixed results for the time it takes a trained CatBoost model to make a prediction versus other models. Furthermore, the authors report classification time for the algorithms they compare on entire datasets. In one case, CatBoost is slowest, taking 7.25 seconds to classify instances of the CICIDS [[92](/articles/10.1186/s40537-020-00369-8#ref-CR92 "University of New Brunswick. Intrusion detection evaluation dataset \(cicids2017\). 
                  https://www.unb.ca/cic/datasets/ids-2017.html
                  
                , 1 2020. \(Online\). Accessed 18 March 2020.")] dataset as attack/not attack traffic. On the other hand, CatBoost outperforms LightGBM when the authors use CatBoost to classify CICDS into types of attacks. However, in the multi-class case, Support Vector Machine, and Logistic Regression are faster. The results Bakhareva et al. report in [[37](/articles/10.1186/s40537-020-00369-8#ref-CR37 "Bakhareva N, Shukhman A, Matveev A, Polezhaev P, Ushakov Y, Legashev L. Attack detection in enterprise networks by machine learning methods. In: 2019 international Russian automation conference \(RusAutoCon\). 2019; pages 1–6.")] show that CatBoost is the best detector of attacks, but there is a trade-off in terms of running time.

We find only one study where researchers use CatBoost in the area of Cyber-security. We see opportunities for future research to apply CatBoost to network security tasks given the success of other researchers in the field [[93](/articles/10.1186/s40537-020-00369-8#ref-CR93 "Maryam MN, Taghi MK, Clifford Kemp, Seliya N, Richard Z. Machine learning for detecting brute force attacks at the network level. In 2014 IEEE International Conference on Bioinformatics and Bioengineering. IEEE, New York. 2014; pp. 379–385."), [94](/articles/10.1186/s40537-020-00369-8#ref-CR94 "Najafabadi MM, Khoshgoftaar TM, Napolitano A. Detecting network attacks based on behavioral commonalities. Int J Reliability Quality Safety Eng. 2016;23\(01\):1650005.")] and [[95](/articles/10.1186/s40537-020-00369-8#ref-CR95 "Wald Randall, Khoshgoftaar Taghi M. Richard Zuech, and Amri Napolitano. Network traffic prediction models for near-and long-term predictions. In 2014 IEEE International Conference on Bioinformatics and Bioengineering, 2014; IEEE, New York. pp. 362–368.")]. Therefore, there may be further opportunities to apply CatBoost to other problems where GBDT’s are known to provide good solutions for Cyber-security challenges. CatBoost’s applicability in a wide range of subjects implies that we should be able to find more problems in the realm of Cyber-security where CatBoost is a good solution. Bakhareva et al. results imply that CatBoost is a good choice when accuracy in identifying attacks is more important than latency considerations in designing network security systems. Next, we turn our attention to the subject of CatBoost in Bio-chemistry.

### Bio-chemistry

Yi et al. apply CatBoost in a study on predicting associations between molecules entitled “Construction and analysis of molecular association network by combining behavior representation and node attributes” [[38](/articles/10.1186/s40537-020-00369-8#ref-CR38 "Yi Hai-Cheng, You Zhu-Hong, Guo Zhen-Hao. Construction and analysis of molecular association network by combining behavior representation and node attributes. Front Genetics. 2019;10:1.")]. In this paper the authors construct a graph with eight types of nodes. The types of nodes are: proteins, micro-ribonucleic acids (\\(\text {miRNA}\\)) [[96](/articles/10.1186/s40537-020-00369-8#ref-CR96 "Tanase C, Ogrezeanu I, Badiu C. Molecular pathology of pituitary adenomas. Netherlands: Elsevier; 2011.")], long non-coding ribonucleic acids (\\(\text {lncRNA}\\)) [[97](/articles/10.1186/s40537-020-00369-8#ref-CR97 "Fang Y, Fullwood MJ. Roles, functions, and mechanisms of long non-coding rnas in cancer. Genom Proteom Bioinf. 2016;14\(1\):42–54.")], messenger ribonucleic acids (\\(\text {mRNA}\\)) [[98](/articles/10.1186/s40537-020-00369-8#ref-CR98 "Brawerman G. Eukaryotic messenger RNA. Ann Rev Biochem. 1974;43\(1\):621–42.")], circular ribonucleic acids (\\(\text {circRNA}\\)) [[99](/articles/10.1186/s40537-020-00369-8#ref-CR99 "Chen L-L, Yang L. Regulation of circrna biogenesis. RNA Biol. 2015;12\(4\):381–8.")], drugs, microbes, and diseases. The edges in the graph are associations between two nodes of different types. In this study, Yi _et al._ call this graph the molecular association network (\\(\text {MAN}\\)). Yi et al. use the High Order Proximity preserved Embedding (\\(\text {HOPE}\\)) [[100](/articles/10.1186/s40537-020-00369-8#ref-CR100 "Ou M, Cui P, Pei J, Zhang Z, Zhu W. Asymmetric transitivity preserving graph embedding. In: Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining. 2016; p. 1105–1114.")] algorithm to learn a vector representation of the nodes in the MAN. They use the components of this vector representation as some features of a dataset for a classifier, and they obtain more features for the dataset from attributes of the different types of nodes in the MAN. However, not all the attributes of the different types of nodes have the same dimensionality. So, they employ an autoencoder to learn representations of the nodes in the MAN such that the representations are vectors all having the same number of components. The components of the vectors that the autoencoder learns constitute more input values for a classifier. The composite of the vector representation that HOPE learns, and the vector representation that the autoencoder learns is the complete representation of a node in the MAN. Though Yi et al. do not explicitly state this, we believe it must be the case that the dataset they use with a classifier consists of pairs of the composite representations of nodes in the MAN, where a pair is labeled as a member of the positive class if there is an association between nodes, and a member of the negative class otherwise.

After Yi et al. obtain the labeled dataset, they compare the performance of several classifiers in their ability to predict associations between members of the MAN. The performance metrics they use are: accuracy, sensitivity, specificity, precision, and Mathews’ correlation coefficient. The classifiers they use are: XGBoost, AdaBoost [[101](/articles/10.1186/s40537-020-00369-8#ref-CR101 "Freund Y, Schapire RE. A desicion-theoretic generalization of on-line learning and an application to boosting. In: European conference on computational learning theory. Springer. 1995; p 23–37.")], Random Forest, Logistic Regression, and CatBoost. Table [20](/articles/10.1186/s40537-020-00369-8#Tab20) is a copy of [[38](/articles/10.1186/s40537-020-00369-8#ref-CR38 "Yi Hai-Cheng, You Zhu-Hong, Guo Zhen-Hao. Construction and analysis of molecular association network by combining behavior representation and node attributes. Front Genetics. 2019;10:1.")] [Tab. 3], that shows the results of their performance evaluation. CatBoost has the best results of all classifiers in all metrics except for specificity. The work Yi et al. conduct in this study is interesting because it illustrates a way to use \\(\text {ML}\\) techniques, including CatBoost to work with a heterogeneous network of objects.

**Table 20 From Yi et al. the proposed method is CatBoost**

[ Full size table](/articles/10.1186/s40537-020-00369-8/tables/20)

One interesting thing to note about Yi et al. study is that it involves a graph representation of data, and experiments with systems where CatBoost is a component, and others where XGBoost is a Component. We see in Table [20](/articles/10.1186/s40537-020-00369-8#Tab20) that CatBoost outperforms XGBoost. This is quite different from the results Spadon et al. report on a study involving graphs of data, where the authors report nearly similar performance for both CatBoost and XGBoost. This is evidence that not all problems involving data with graph representations are best solved with a particular GBDT implementation. It also raises further interest in the question of how CatBoost’s sensitivity to hyper-parameters and hyper-parameter tuning impacts CatBoost’s performance in graph-related \\(\text {ML}\\) problems. Next, we cover an application of CatBoost to the study of on-line marketing.

### Marketing

Clickstream data is web application usage data that web applications collect as users interact with the web sites the application provides. Busy web sites with millions of daily users can generate large amounts of clickstream data that falls into the domain of Big Data. “Predicting online shopping behaviour from clickstream data using deep learning” by Koehn et al. is a study on using \\(\text {ML}\\) to predict user behavior from clickstream data [[39](/articles/10.1186/s40537-020-00369-8#ref-CR39 "Koehn D, Lessmann S, Schaal M. Predicting online shopping behaviour from clickstream data using deep learning. Expert Syst Appl. 2020;150:113342.")]. This study focuses largely on neural networks for making these predictions, but CatBoost plays a very important role. The authors find that they get their best results when they employ an ensemble of a Gated Recurrent Unit (\\(\text {GRU}\\)) based neural network and CatBoost. The ensemble technique the authors use is to compute the mean value of the output of the neural network and CatBoost for their final prediction. Koehn _et al._ give some important practical advice for choosing to use the ensemble of the \\(\text {GRU}\\)-based neural network and CatBoost. The advice is that when one observes two strong models with low correlation between their output values, an ensemble of those two models may perform even better. Therefore, researchers considering taking on work to classify clickstream data may find that CatBoost will form part of an ensemble with the best performance. Figure [8](/articles/10.1186/s40537-020-00369-8#Fig8) shows an image reproduced from Koehn et al. [[39](/articles/10.1186/s40537-020-00369-8#ref-CR39 "Koehn D, Lessmann S, Schaal M. Predicting online shopping behaviour from clickstream data using deep learning. Expert Syst Appl. 2020;150:113342.")] (Fig. [8](/articles/10.1186/s40537-020-00369-8#Fig8)), that demonstrates how the ensemble technique provides the best AUC for predicting user behavior from clickstream data.

**Fig. 8**

[![figure 8](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig8_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/8)

Image from [[39](/articles/10.1186/s40537-020-00369-8#ref-CR39 "Koehn D, Lessmann S, Schaal M. Predicting online shopping behaviour from clickstream data using deep learning. Expert Syst Appl. 2020;150:113342.")] illustrating best results for ensemble of CatBoost and \\(\text {GRU}\\); Here, the authors refer to CatBoost as Gradient Boosted Machine (GBM)

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/8)

Another example of a study that shows the inferiority of gradient boosted tree algorithms to neural networks for \\(\text {ML}\\) tasks involving homogeneous data is “A clstm-tmn for marketing intention detection” by Wang et al. [[102](/articles/10.1186/s40537-020-00369-8#ref-CR102 "Wang Y, Ma K, Garcia-Hernandez L, Chen J, Hou Z, Ji K, Chen Z, Abraham A. A clstm-tmn for marketing intention detection. Eng Appl Artificial Intell. 2020;91:103595.")]. In this study the authors compare various algorithms on the task of classifying text that contains news with marketing intent, and text that contains news without marketing intent. Hence, the \\(\text {ML}\\) task has as input homogeneous data of natural language text. The results that Wang et al. present clearly show CatBoost, LightGBM, and XGBoost under-perform several neural network based algorithms. We include a copy of the key results here in Fig. [9](/articles/10.1186/s40537-020-00369-8#Fig9) that provide evidence for Prokhorenkova et al. claim that neural network based solutions may work better than \\(\text {GBDT}\\)’s for tasks involving heterogeneous data.

**Fig. 9**

[![figure 9](//media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs40537-020-00369-8/MediaObjects/40537_2020_369_Fig9_HTML.png)](/articles/10.1186/s40537-020-00369-8/figures/9)

Image from [[102](/articles/10.1186/s40537-020-00369-8#ref-CR102 "Wang Y, Ma K, Garcia-Hernandez L, Chen J, Hou Z, Ji K, Chen Z, Abraham A. A clstm-tmn for marketing intention detection. Eng Appl Artificial Intell. 2020;91:103595.")] illustrating neural network based algorithms outperforming Gradient Boosted tree algorithms for classifying homogeneous text data in the SoHu dataset of news articles labeled as with or without marketing intent

[Full size image](/articles/10.1186/s40537-020-00369-8/figures/9)

The two studies we find related to Marketing that involve CatBoost serve to point out important considerations to make when deciding to use GBDT’s or neural network based solutions. The first is that an ensemble technique may work well, as in the case of Koehn _et al._ The second is that for homogeneous data, GBDT’s may not be the ideal choice, as is the case with Wang et al. The final subject area we cover is Biology.

### Biology

We find one study related to clear cell renal cell carcinoma (\\(\text {ccRCC}\\)), “Ct-based machine learning model to predict the fuhrman nuclear grade of clear cell renal cell carcinoma” [[28](/articles/10.1186/s40537-020-00369-8#ref-CR28 "Lin F, Cui EM, Lei Y, Luo L. Ct-based machine learning model to predict the fuhrman nuclear grade of clear cell renal cell carcinoma. Abdominal Radiol. 2019;44\(7\):2528–34.")], by Lin et al. According to The National Cancer Institute [[103](/articles/10.1186/s40537-020-00369-8#ref-CR103 "National Cancer Institute. Clear cell renal cell carcinoma. 2020. 
                  https://www.cancer.gov/pediatric-adult-rare-tumor/rare-tumors/rare-kidney-tumors/clear-cell-renal-cell-carcinoma
                  
                . Accessed 9 June 2020.")], \\(\text {ccRCC}\\) is a form of kidney cancer that makes up about 80% of all kidney cancer cases. Therefore, advances in treating \\(\text {ccRCC}\\) stand to benefit the largest number of people who suffer from kidney cancer. In their study, the authors employ CatBoost to classify Magnetic Resonance \\(\text {MR}\\) and Computed Tomography \\(\text {CT}\\) in the task of identifying \\(\text {ccRCC}\\) in the images. Their study does not appear to be research where authors use Big Data techniques. The authors do not report the size of their dataset, but they write that the CT images they use come from a cohort of 231 patients. However, we chose to include this study since image classification for disease diagnoses is potentially a machine learning task where one could employ Big Data techniques. After selecting images for their cohort, Lin et al. indicate that they use the ITK-SNAPFootnote 5 application to segment the images into regions of interest. The ITK-SNAP website mentions that ITK-SNAP application performs “semi-automatic” segmentation. Therefore, future work to apply the results of this study in a Big Data setting, would be to apply a fully automated technique for medical image segmentation, such as those covered in “Automated medical image segmentation techniques” [[104](/articles/10.1186/s40537-020-00369-8#ref-CR104 "Sharma N, Aggarwal LM. Automated medical image segmentation techniques. J Med Phys Assoc Med Phys India. 2010;35\(1\):3.")], by Sharma and Aggarwal. The remaining components of their system for classifying images are fully automated. Lin et al. use a Python library for extracting features from the segmented images, and then use these features as input to CatBoost. For the classifier component of their system, the authors use CatBoost exclusively. They report encouraging performance metrics, but the results would be more meaningful if they employed other classifiers. One would like to know if any other classifiers, especially a classifier built on a convolutional neural network, would have significantly different performance.

Another work related to the study of diseases, and one study that researchers may find germane in the wake of the Covid-19 pandemic is “Diseases spread prediction in tropical areas by machine learning methods ensembling and spatial analysis techniques” [[27](/articles/10.1186/s40537-020-00369-8#ref-CR27 "Kolesnikov AA, Kikin PM, Portnov AM. Diseases spread prediction in tropical areas by machine learning methods ensembling and spatial analysis techniques. ISPRS. 2019;8XLII–3/W:221–6.")], by Kolesnikov et al. In this study the authors use several \\(\text {ML}\\) regression algorithms to predict the number of dengue fever cases in a region during a particular week. One of the learners that the authors employ is CatBoost. CatBoost is not presented as the best performing algorithm in this study. The best performing regression algorithm in this study is a combination of XGBoost and \\(\text {LSTM}\\). The authors do not document whether they examined the performance of other Gradient Boosted Decision Tree ensemble algorithms with \\(\text {LSTM}\\), so there is an opportunity to investigate how a combination of CatBoost and \\(\text {LSTM}\\) would compare to the combination of XGBoost and \\(\text {LSTM}\\). We could see results similar to what Koehn et al. find, where CatBoost is the best choice for an ensemble of a \\(\text {GBDT}\\) and \\(\text {GRU}\\). \\(\text {GRU}\\)’s and \\(\text {LSTM}\\)’s are both recurrent neural networks. The outcome of that future work would help researchers understand how well-suited CatBoost is for regression problems involving time-series data. Furthermore, we foresee researchers having a stronger interest in studies similar to Kolesnikov et al. due to the Covid-19 pandemic.

In summary, we see CatBoost for two different applications in the field of Biology: one related to detection of types of kidney cancer, and another for predicting the spread of disease. In the case of Lin et al. for detecting kidney cancer from image-based data, we conjecture one might obtain better results employing a classifier more suited to homogeneous data. On the other hand, for studies like the one Kolesnikov et al. conduct, CatBoost may be a good choice for an ensemble technique with some type of recurrent neural network.

## Conclusions

The research we cover in this survey leads us primarily to the conclusion that CatBoost is a good candidate for \\(\text {ML}\\) implementations involving Big Data. Researchers should consider using it with datasets that are heterogeneous, and have categorical features. The results we cover imply one cannot rule out other GBDT implementations for specific problems, and that a common practice is to use more than one. However, since it is easy to use because of its automatic handling of categorical values, and strong performance relative to other GBDT implementations, we believe CatBoost will remain a suitable choice for many applications for some time.

Another aspect of CatBoost we uncovered is its sensitivity to hyper-parameter settings. Settings for the maximum number of iterations for CatBoost to use, the maximum depth of constituent Decision Trees, and the maximum number of combinations of categorical features to combine are values the user can alter to trade resource consumption for performance. Furthermore, values that researchers use for these hyper-parameters may help explain discrepancies in performance of CatBoost with respect to other learners.

Our interdisciplinary approach highlights the wide variety of fields where researchers have employed CatBoost. This shows not only the generality of CatBoost, but also that researchers who have a good understanding of it have an opportunity to collaborate with experts in other fields. We see several opportunities for such collaboration. We find many studies where researchers do not document the use of any hyper-parameter optimization method for the learners they use. This implies we can obtain more insightful results simply by doing that optimization. We see two examples of studies where the authors use model blending, but it is not clear how they derive the coefficients for the outputs of constituent models, so there is an opportunity for research on a robust method for blending model outputs where one of the models is CatBoost. In our coverage of the uses of CatBoost for electricity theft detection, we find opportunities for future research into feature selection techniques. Also, in our review of applications of CatBoost in electricity theft detection, we find a chance for research into the extent of the generality of Punmiya and Choe’s technique of augmenting a dataset with summary statistics to boost performance. Another interesting technique that we find in the domain of Traffic Engineering research is the Tri-CatBoost semi-supervised technique for labeling data that may have applications for problems involving datasets with class noise. Our description of GBDT’s, and the CatBoost implementation, as well as our coverage of various studies, provides expert knowledge that empowers one to employ CatBoost in these or many other future endeavors.

## Availability of data and materials

Not applicable.

## Notes

  1. [https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html](https://www.csie.ntu.edu.tw/%7ecjlin/libsvmtools/datasets/binary.html).

  2. <https://catboost.ai/docs/concepts/python-reference_parameters-list.html#python-reference_parameters-list>.

  3. <https://lendingclub.com>

  4. <http://biometrics.idealtest.org/>

  5. <http://www.itksnap.org>




## Abbreviations

ADASYN:
    

Adaptive synthetic sampling approach

ANN:
    

Artificial neural network

API:
    

application programming interface

AUC:
    

area under the receiver operating characteristic curve

BDLSTM:
    

Bidirectional long short term memory

BNN:
    

Bagging neural network

CASIA:
    

Chinese Academy of Sciences Institute of Automation

ccRCC:
    

Clear cell renal cell carcinoma

CFS:
    

Correlation-based features

circRNA:
    

Circular ribonucleic acid

CNN:
    

Convolutional neural network

CPBETD:
    

Consumption pattern-based electricity theft detector

CT:
    

Computed tomography

DT:
    

Decision tree

ELSA:
    

English longitudinal study on aging

ESO:
    

European Southern Observatory

ET:
    

Evapotranspiration

GBDT:
    

Gradient bosted decision trees

GRU:
    

Gated Recurrent Unit

HOPE:
    

High order proximity preserved embedding

IFS:
    

Incremental feature selection

KiDS:
    

Kilo Degree Survey

KNN:
    

K-nearest neighbors

lncRNA:
    

Long non-coding ribonucleic acid

LR:
    

Logistic regression

LSTM:
    

Long short-term memory

MAN:
    

Molecular association network

MAPE:
    

Mean absolute percentage error

MCC:
    

Matthews’ Correlation Coefficient

miRNA:
    

Micro-ribonucleic acid

ML:
    

Machine learning

MR:
    

Magnetic resonance

mRNA:
    

Messenger ribonucleic acid

MWMOTE:
    

Majority weighted minority over-sampling technique

NDCG:
    

Normalized discounted cumulative gain

NIPS:
    

Advances in neural information processing systems

NTL:
    

Non-technical loss

ODT:
    

Oblivious decision tree

OS:
    

Optical sensor quasars quasi-stellar radio source

RF:
    

Random forest

RFE:
    

Recursive feature elimination

RGF:
    

Regularized greedy forests

RMSE:
    

Root mean squared error

RRF:
    

Regularized random forest

RSME:
    

Root mean squared error

RT:
    

Regression tree

SDSS:
    

Sloan digital sky survey

SHAP:
    

Shapley additive explanations

SMO:
    

Sequential minimal optimization

SMOTE:
    

Synthetic minority over-sampling technique

SVC:
    

Support vector classification

SVM:
    

Support vector machine

TB:
    

Terabytes

TF-IDF:
    

Term frequency—inverse document frequency

TS:
    

Target statistic

## References

  1. Kotsiantis SB, Zaharakis I, Pintelas P. Supervised machine learning: a review of classification techniques. Emerg Artif Intellig Appl Comput Eng. 2007;160(1):3–24.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Supervised%20machine%20learning%3A%20a%20review%20of%20classification%20techniques&journal=Emerg%20Artif%20Intellig%20Appl%20Comput%20Eng&volume=160&issue=1&pages=3-24&publication_year=2007&author=Kotsiantis%2CSB&author=Zaharakis%2CI&author=Pintelas%2CP)

  2. Liudmila P, Gleb G, Aleksandr V, Anna Veronika D, Andrey G. Catboost: unbiased boosting with categorical features. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, _Advances in Neural Information Processing Systems 31_ , 2018; pages 6638–6648. Curran Associates, Inc.

  3. Johnson JM, Khoshgoftaar TM. Deep learning and data sampling with imbalanced big data. In: 2019 IEEE 20th international conference on information reuse and integration for data science (IRI). 2019; p. 175–183.

  4. Johnson JM, Khoshgoftaar TM. Medicare fraud detection using neural networks. J Big Data. 2019;1:1.

[Article](https://doi.org/10.32604%2Fjbd.2019.05899) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Medicare%20fraud%20detection%20using%20neural%20networks&journal=J%20Big%20Data.&doi=10.32604%2Fjbd.2019.05899&volume=1&publication_year=2019&author=Johnson%2CJM&author=Khoshgoftaar%2CTM)

  5. Yasunari M, Takuomi H, Anna O, Kouichi Y, Uesawa Y. Prediction model of aryl hydrocarbon receptor activation by a novel qsar approach, deepsnap-deep learning. Molecules. 2020;25(6):1317.

[Article](https://doi.org/10.3390%2Fmolecules25061317) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Prediction%20model%20of%20aryl%20hydrocarbon%20receptor%20activation%20by%20a%20novel%20qsar%20approach%2C%20deepsnap-deep%20learning&journal=Molecules&doi=10.3390%2Fmolecules25061317&volume=25&issue=6&publication_year=2020&author=Yasunari%2CM&author=Takuomi%2CH&author=Anna%2CO&author=Kouichi%2CY&author=Uesawa%2CY)

  6. Johnson JM, Khoshgoftaar TM. Survey on deep learning with class imbalance. J Big Data. 2019;6(1):1–54.

[Article](https://link.springer.com/doi/10.1186/s40537-018-0162-3) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Survey%20on%20deep%20learning%20with%20class%20imbalance&journal=J%20Big%20Data&doi=10.1186%2Fs40537-018-0162-3&volume=6&issue=1&pages=1-54&publication_year=2019&author=Johnson%2CJM&author=Khoshgoftaar%2CTM)

  7. Spadon Gabriel, de Carvalho Andre C P L F, Rodrigues-Jr Jose F, Alves Luiz G A. Reconstructing commuters network using machine learning and urban indicators. Scientific Reports. 2019;9(1):N.PAG.

[Article](https://doi.org/10.1038%2Fs41598-019-48295-x) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Reconstructing%20commuters%20network%20using%20machine%20learning%20and%20urban%20indicators&journal=Scientific%20Reports&doi=10.1038%2Fs41598-019-48295-x&volume=9&issue=1&publication_year=2019&author=Spadon%2CGabriel&author=Carvalho%2CAndre%20C%20P%20L%20F&author=Rodrigues-Jr%2CJose%C2%A0F&author=Alves%2CLuiz%20G%C2%A0A)

  8. Anghel A, Papandreou N, Parnell T, Palma A, Pozidis H. Benchmarking and optimization of gradient boosting decision tree algorithms, 2018.

  9. Chen T, Guestrin C. Xgboost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining—KDD ’16. 2016.

  10. Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, Ye Q, Liu TY. Lightgbm: a highly efficient gradient boosting decision tree. In: Guyon I, Luxburg UV, Bengio S, Wallach H, Fergus R, Vishwanathan S, Garnett R, editors. Advances in neural information processing systems. New York: Curran Associates; 2017. p. 3146–54.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Lightgbm%3A%20a%20highly%20efficient%20gradient%20boosting%20decision%20tree&pages=3146-3154&publication_year=2017&author=Ke%2CG&author=Meng%2CQ&author=Finley%2CT&author=Wang%2CT&author=Chen%2CW&author=Ma%2CW&author=Ye%2CQ&author=Liu%2CTY)

  11. Hasanin T, Khoshgoftaar TM, Leevy JL, Bauder RA. Investigating class rarity in big data. J Big Data. 2020;7(1):1–17.

[Article](https://link.springer.com/doi/10.1186/s40537-020-00301-0) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Investigating%20class%20rarity%20in%20big%20data&journal=J%20Big%20Data&doi=10.1186%2Fs40537-020-00301-0&volume=7&issue=1&pages=1-17&publication_year=2020&author=Hasanin%2CT&author=Khoshgoftaar%2CTM&author=Leevy%2CJL&author=Bauder%2CRA)

  12. Herland M, Khoshgoftaar TM, Bauder RA. Big data fraud detection using multiple medicare data sources. J Big Data. 2018;5(1):29.

[Article](https://link.springer.com/doi/10.1186/s40537-018-0138-3) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Big%20data%20fraud%20detection%20using%20multiple%20medicare%20data%20sources&journal=J%20Big%20Data&doi=10.1186%2Fs40537-018-0138-3&volume=5&issue=1&publication_year=2018&author=Herland%2CM&author=Khoshgoftaar%2CTM&author=Bauder%2CRA)

  13. Sheshasaayee A, Lakshmi JVN. An insight into tree based machine learning techniques for big data analytics using apache spark. 2017 International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT), July 2017; pp. 1740–1743.

  14. Matei Z, Reynold XS, Patrick W, Tathagata D, Michael a, A Dave, Xiangrui M, Josh R, Shivaram V, Michael FJ, Ghodsi A, Joseph G, Schenkert S, I Stoica. Apache spark: a unified engine for big data processing. Commun. ACM. 2016;59(11):56–65.

[Article](https://doi.org/10.1145%2F2934664) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Apache%20spark%3A%20a%20unified%20engine%20for%20big%20data%20processing&journal=Commun.%20ACM&doi=10.1145%2F2934664&volume=59&issue=11&pages=56-65&publication_year=2016&author=Matei%2CZ&author=Reynold%2CXS&author=Patrick%2CW&author=Tathagata%2CD&author=Michael%2Ca&author=A%2CDave&author=Xiangrui%2CM&author=Josh%2CR&author=Shivaram%2CV&author=Michael%2CFJ&author=Ghodsi%2CA&author=Joseph%2CG&author=Schenkert%2CS&author=I%2CStoica)

  15. Ensembles—rdd-based api. <https://spark.apache.org/docs/latest/mllib-ensembles.html>, 2020.

  16. Hasanin T, Khoshgoftaar TM, Leevy JL. A comparison of performance metrics with severely imbalanced network security big data. In: 2019 IEEE 20th international conference on information reuse and integration for data science (IRI). IEEE. 2019; p 83–88.

  17. Sudha P, Gunavathi R. A survey paper on map reduce in big data. International Journal of Science and Research. 2016;5(9).

  18. Khramtsov V, Sergeyev A, Spiniello C, Tortora C, Napolitano NR, Agnello A, Getman F, Jong JTA, Kuijken K, Radovich M, Shan H, Shulga V. KiDS-SQuaD II. Machine learning selection of bright extragalactic objects to search for new gravitationally lensed quasars. Astonomy Astrophys. 2019;2019:632.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=KiDS-SQuaD%20II.%20Machine%20learning%20selection%20of%20bright%20extragalactic%20objects%20to%20search%20for%20new%20gravitationally%20lensed%20quasars&journal=Astonomy%20Astrophys&volume=2019&publication_year=2019&author=Khramtsov%2CV&author=Sergeyev%2CA&author=Spiniello%2CC&author=Tortora%2CC&author=Napolitano%2CNR&author=Agnello%2CA&author=Getman%2CF&author=Jong%2CJTA&author=Kuijken%2CK&author=Radovich%2CM&author=Shan%2CH&author=Shulga%2CV)

  19. Daoud EA. Comparison between xgboost, lightgbm and catboost using a home credit dataset. Int J Comput Inf Eng. 2019;13(1):6–10.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Comparison%20between%20xgboost%2C%20lightgbm%20and%20catboost%20using%20a%20home%20credit%20dataset&journal=Int%20J%20Comput%20Inf%20Eng&volume=13&issue=1&pages=6-10&publication_year=2019&author=Daoud%2CEA)

  20. Yufei Xia, Lingyun He, Yinguo Li, Nana Liu, Yanlin Ding. Predicting loan default in peer-to-peer lending using narrative data. J Forecasting. 2020;39(2):260.

[Article](https://doi.org/10.1002%2Ffor.2625) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Predicting%20loan%20default%20in%20peer-to-peer%20lending%20using%20narrative%20data&journal=J%20Forecasting&doi=10.1002%2Ffor.2625&volume=39&issue=2&publication_year=2020&author=Yufei%2CXia&author=Lingyun%2CHe&author=Yinguo%2CLi&author=Nana%2CLiu&author=Yanlin%2CDing)

  21. Zhang F, Fleyeh H. Short term electricity spot price forecasting using catboost and bidirectional long short term memory neural network. 2019 16th International Conference on the European Energy Market (EEM), Sep. 2019; pp. 1–6.

  22. Zhang Haichao, Zeng Ruishuang, Chen Linling, Zhang Shangfeng. Research on personal credit scoring model based on multi-source data. J Phys Conference Series. 2020;1437:012053.

[Article](https://doi.org/10.1088%2F1742-6596%2F1437%2F1%2F012053) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Research%20on%20personal%20credit%20scoring%20model%20based%20on%20multi-source%20data&journal=J%20Phys%20Conference%20Series&doi=10.1088%2F1742-6596%2F1437%2F1%2F012053&volume=1437&publication_year=2020&author=Zhang%2CHaichao&author=Zeng%2CRuishuang&author=Chen%2CLinling&author=Zhang%2CShangfeng)

  23. Adamović S, Miškovic V, Maček N, Milosavljević M, Šarac M, Saračević M, Gnjatović M. An efficient novel approach for iris recognition based on stylometric features and machine learning techniques. Fut Gener Comput Syst. 2020;107:144–57.

[Article](https://doi.org/10.1016%2Fj.future.2020.01.056) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=An%20efficient%20novel%20approach%20for%20iris%20recognition%20based%20on%20stylometric%20features%20and%20machine%20learning%20techniques&journal=Fut%20Gener%20Comput%20Syst&doi=10.1016%2Fj.future.2020.01.056&volume=107&pages=144-157&publication_year=2020&author=Adamovi%C4%87%2CS&author=Mi%C5%A1kovic%2CV&author=Ma%C4%8Dek%2CN&author=Milosavljevi%C4%87%2CM&author=%C5%A0arac%2CM&author=Sara%C4%8Devi%C4%87%2CM&author=Gnjatovi%C4%87%2CM)

  24. Kong SH, Ahn D, Kim B, Srinivasan K, Ram S, Kim H, Hong AR, Kim JH, Cho NH, Shin CS. A novel fracture prediction model using machine learning in a community-based cohort. JBMR Plus. 2020;4(3):1.

[Article](https://doi.org/10.1002%2Fjbm4.10337) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20novel%20fracture%20prediction%20model%20using%20machine%20learning%20in%20a%20community-based%20cohort&journal=JBMR%20Plus&doi=10.1002%2Fjbm4.10337&volume=4&issue=3&publication_year=2020&author=Kong%2CSH&author=Ahn%2CD&author=Kim%2CB&author=Srinivasan%2CK&author=Ram%2CS&author=Kim%2CH&author=Hong%2CAR&author=Kim%2CJH&author=Cho%2CNH&author=Shin%2CCS)

  25. Saifur R, Muhammad I, Mohsin R, Khawaja M-G, Shumayla Y, Muhammad A. Performance analysis of boosting classifiers in recognizing activities of daily living. Int J Environ Res Public Health. 2020;17(3):1082.

[Article](https://doi.org/10.3390%2Fijerph17031082) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Performance%20analysis%20of%20boosting%20classifiers%20in%20recognizing%20activities%20of%20daily%20living&journal=Int%20J%20Environ%20Res%20Public%20Health&doi=10.3390%2Fijerph17031082&volume=17&issue=3&publication_year=2020&author=Saifur%2CR&author=Muhammad%2CI&author=Mohsin%2CR&author=Khawaja%2CM-G&author=Shumayla%2CY&author=Muhammad%2CA)

  26. Yang H, Bath PA. The use of data mining methods for the prediction of dementia: evidence from the english longitudinal study of aging. IEEE J Biomed Health Inform. 2020;24(2):345–53.

[Article](https://doi.org/10.1109%2FJBHI.2019.2921418) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=The%20use%20of%20data%20mining%20methods%20for%20the%20prediction%20of%20dementia%3A%20evidence%20from%20the%20english%20longitudinal%20study%20of%20aging&journal=IEEE%20J%20Biomed%20Health%20Inform&doi=10.1109%2FJBHI.2019.2921418&volume=24&issue=2&pages=345-353&publication_year=2020&author=Yang%2CH&author=Bath%2CPA)

  27. Kolesnikov AA, Kikin PM, Portnov AM. Diseases spread prediction in tropical areas by machine learning methods ensembling and spatial analysis techniques. ISPRS. 2019;8XLII–3/W:221–6.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Diseases%20spread%20prediction%20in%20tropical%20areas%20by%20machine%20learning%20methods%20ensembling%20and%20spatial%20analysis%20techniques&journal=ISPRS&volume=8XLII%E2%80%933%2FW&pages=221-226&publication_year=2019&author=Kolesnikov%2CAA&author=Kikin%2CPM&author=Portnov%2CAM)

  28. Lin F, Cui EM, Lei Y, Luo L. Ct-based machine learning model to predict the fuhrman nuclear grade of clear cell renal cell carcinoma. Abdominal Radiol. 2019;44(7):2528–34.

[Article](https://link.springer.com/doi/10.1007/s00261-019-01992-7) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Ct-based%20machine%20learning%20model%20to%20predict%20the%20fuhrman%20nuclear%20grade%20of%20clear%20cell%20renal%20cell%20carcinoma&journal=Abdominal%20Radiol&doi=10.1007%2Fs00261-019-01992-7&volume=44&issue=7&pages=2528-2534&publication_year=2019&author=Lin%2CF&author=Cui%2CEM&author=Lei%2CY&author=Luo%2CL)

  29. Coma-Puig B, Carmona J. Bridging the gap between energy consumption and distribution through non-technical loss detection. Energies. 2019;12(9):1748.

[Article](https://doi.org/10.3390%2Fen12091748) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Bridging%20the%20gap%20between%20energy%20consumption%20and%20distribution%20through%20non-technical%20loss%20detection&journal=Energies&doi=10.3390%2Fen12091748&volume=12&issue=9&publication_year=2019&author=Coma-Puig%2CB&author=Carmona%2CJ)

  30. Ghori KM, Ayaz A Rabeeh, Awais M, Imran M, Ullah A, Szathmary L. Impact of feature selection on non-technical loss detection. In: 2020 6th conference on data science and machine learning applications (CDMA). 2020; p 19–24.

  31. Punmiya R, Choe S. Energy theft detection using gradient boosting theft detector with feature engineering-based preprocessing. IEEE Trans Smart Grid. 2019;10(2):2326–9.

[Article](https://doi.org/10.1109%2FTSG.2019.2892595) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Energy%20theft%20detection%20using%20gradient%20boosting%20theft%20detector%20with%20feature%20engineering-based%20preprocessing&journal=IEEE%20Trans%20Smart%20Grid&doi=10.1109%2FTSG.2019.2892595&volume=10&issue=2&pages=2326-2329&publication_year=2019&author=Punmiya%2CR&author=Choe%2CS)

  32. Fan Junliang, Wang Xiukang, Zhang Fucang, Ma Xin, Lifeng Wu. Predicting daily diffuse horizontal solar radiation in various climatic regions of china using support vector machine and tree-based soft computing models with local and extrinsic climatic data. J Clean Prod. 2020;248:119264.

[Article](https://doi.org/10.1016%2Fj.jclepro.2019.119264) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Predicting%20daily%20diffuse%20horizontal%20solar%20radiation%20in%20various%20climatic%20regions%20of%20china%20using%20support%20vector%20machine%20and%20tree-based%20soft%20computing%20models%20with%20local%20and%20extrinsic%20climatic%20data&journal=J%20Clean%20Prod&doi=10.1016%2Fj.jclepro.2019.119264&volume=248&publication_year=2020&author=Fan%2CJunliang&author=Wang%2CXiukang&author=Zhang%2CFucang&author=Ma%2CXin&author=Lifeng%2CWu)

  33. Huang G, Lifeng W, Ma X, Zhang W, Fan J, Xiang Y, Zeng W, Zhou H. Evaluation of catboost method for prediction of reference evapotranspiration in humid regions. J Hydrol. 2019;574:1029–41.

[Article](https://doi.org/10.1016%2Fj.jhydrol.2019.04.085) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Evaluation%20of%20catboost%20method%20for%20prediction%20of%20reference%20evapotranspiration%20in%20humid%20regions&journal=J%20Hydrol&doi=10.1016%2Fj.jhydrol.2019.04.085&volume=574&pages=1029-1041&publication_year=2019&author=Huang%2CG&author=Lifeng%2CW&author=Ma%2CX&author=Zhang%2CW&author=Fan%2CJ&author=Xiang%2CY&author=Zeng%2CW&author=Zhou%2CH)

  34. Abolfazli A, Brechmann A, Wolff S, Spiliopoulou M. Machine learning identifies the dynamics and influencing factors in an auditory category learning experiment. Sci Rep. 2020;10(1):1.

[Article](https://doi.org/10.1038%2Fs41598-020-61703-x) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Machine%20learning%20identifies%20the%20dynamics%20and%20influencing%20factors%20in%20an%20auditory%20category%20learning%20experiment&journal=Sci%20Rep&doi=10.1038%2Fs41598-020-61703-x&volume=10&issue=1&publication_year=2020&author=Abolfazli%2CA&author=Brechmann%2CA&author=Wolff%2CS&author=Spiliopoulou%2CM)

  35. Arkaprabha S, Ishita B. Screening of anxiety and depression among the seafarers using machine learning technology. Inform Med Unlocked. 2019;16:100149.

[Article](https://doi.org/10.1016%2Fj.imu.2018.12.004) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Screening%20of%20anxiety%20and%20depression%20among%20the%20seafarers%20using%20machine%20learning%20technology&journal=Inform%20Med%20Unlocked&doi=10.1016%2Fj.imu.2018.12.004&volume=16&publication_year=2019&author=Arkaprabha%2CS&author=Ishita%2CB)

  36. Liu W, Deng K, Zhang X, Cheng Y, Zheng Z, Jiang F, Peng J. A semi-supervised tri-catboost method for driving style recognition. Symmetry. 2020;3:336.

[Article](https://doi.org/10.3390%2Fsym12030336) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20semi-supervised%20tri-catboost%20method%20for%20driving%20style%20recognition&journal=Symmetry.&doi=10.3390%2Fsym12030336&volume=3&publication_year=2020&author=Liu%2CW&author=Deng%2CK&author=Zhang%2CX&author=Cheng%2CY&author=Zheng%2CZ&author=Jiang%2CF&author=Peng%2CJ)

  37. Bakhareva N, Shukhman A, Matveev A, Polezhaev P, Ushakov Y, Legashev L. Attack detection in enterprise networks by machine learning methods. In: 2019 international Russian automation conference (RusAutoCon). 2019; pages 1–6.

  38. Yi Hai-Cheng, You Zhu-Hong, Guo Zhen-Hao. Construction and analysis of molecular association network by combining behavior representation and node attributes. Front Genetics. 2019;10:1.

[Article](https://doi.org/10.3389%2Ffgene.2019.01106) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Construction%20and%20analysis%20of%20molecular%20association%20network%20by%20combining%20behavior%20representation%20and%20node%20attributes&journal=Front%20Genetics&doi=10.3389%2Ffgene.2019.01106&volume=10&publication_year=2019&author=Yi%2CHC&author=You%2CZhu-Hong&author=Guo%2CZhen-Hao)

  39. Koehn D, Lessmann S, Schaal M. Predicting online shopping behaviour from clickstream data using deep learning. Expert Syst Appl. 2020;150:113342.

[Article](https://doi.org/10.1016%2Fj.eswa.2020.113342) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Predicting%20online%20shopping%20behaviour%20from%20clickstream%20data%20using%20deep%20learning&journal=Expert%20Syst%20Appl&doi=10.1016%2Fj.eswa.2020.113342&volume=150&publication_year=2020&author=Koehn%2CD&author=Lessmann%2CS&author=Schaal%2CM)

  40. Google.com. Google scholar. <http://scholar.google.com>, May 2020.

  41. Clarivate. Web of science. 2020. <http://login.webofknowledge.com>. Accessed 16 Feb 2020.

  42. Omer S, Lior R. Ensemble learning: a survey. WIREs Data Mining Knowl Discov. 2018;8(4):e1249.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Ensemble%20learning%3A%20a%20survey&journal=WIREs%20Data%20Mining%20Knowl%20Discov&volume=8&issue=4&publication_year=2018&author=Omer%2CS&author=Lior%2CR)

  43. Sujatha M, Prabhakar S, Lavanya GD. A survey of classification techniques in data mining. Int J Innovations Eng Technol (IJIET). 2013;2(4):1058–2319.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20survey%20of%20classification%20techniques%20in%20data%20mining&journal=Int%20J%20Innovations%20Eng%20Technol%20%28IJIET%29.&volume=2&issue=4&pages=1058-2319&publication_year=2013&author=Sujatha%2CM&author=Prabhakar%2CS&author=Lavanya%2CGD)

  44. Friedman JH. Greedy function approximation: a gradient boosting machine. Ann Stat. 2001;12:1189–232.

[Article](https://doi.org/10.1214%2Faos%2F1013203451) [MathSciNet](http://www.ams.org/mathscinet-getitem?mr=1873328) [MATH](http://www.emis.de/MATH-item?1043.62034) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Greedy%20function%20approximation%3A%20a%20gradient%20boosting%20machine&journal=Ann%20Stat&doi=10.1214%2Faos%2F1013203451&volume=12&pages=1189-1232&publication_year=2001&author=Friedman%2CJH)

  45. Micci-Barreca Daniele. A preprocessing scheme for high-cardinality categorical attributes in classification and prediction problems. SIGKDD Explor Newsl. 2001;3(1):27–32.

[Article](https://doi.org/10.1145%2F507533.507538) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20preprocessing%20scheme%20for%20high-cardinality%20categorical%20attributes%20in%20classification%20and%20prediction%20problems&journal=SIGKDD%20Explor%20Newsl&doi=10.1145%2F507533.507538&volume=3&issue=1&pages=27-32&publication_year=2001&author=Micci-Barreca%2CDaniele)

  46. Yin L, Mikhail O. Bdt: Gradient boosted decision tables for high accuracy and scoring efficiency. In: Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining. 2017; pp. 1893–1901.

  47. Hancock JT, Khoshgoftaar TM. Survey on categorical data for neural networks. J Big Data. 2020;7:1–41.

[Article](https://link.springer.com/doi/10.1186/s40537-020-00305-w) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Survey%20on%20categorical%20data%20for%20neural%20networks&journal=J%20Big%20Data&doi=10.1186%2Fs40537-020-00305-w&volume=7&pages=1-41&publication_year=2020&author=Hancock%2CJT&author=Khoshgoftaar%2CTM)

  48. Microsoft Corporation. Advanced topics. 2020. <https://lightgbm.readthedocs.io/en/latest/Advanced-Topics.html>.

  49. Fisher WD. On grouping for maximum homogeneity. J Am Stat Assoc. 1958;53(284):789–98.

[Article](https://doi.org/10.1080%2F01621459.1958.10501479) [MathSciNet](http://www.ams.org/mathscinet-getitem?mr=101577) [MATH](http://www.emis.de/MATH-item?0084.35904) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=On%20grouping%20for%20maximum%20homogeneity&journal=J%20Am%20Stat%20Assoc&doi=10.1080%2F01621459.1958.10501479&volume=53&issue=284&pages=789-798&publication_year=1958&author=Fisher%2CWD)

  50. Microsoft Corporation. Lightgbm. 2020. <https://github.com/Microsoft/LightGBM/blob/master/src/treelearner/feature_histogram.hpp>.

  51. Diao L, Niu D, Zang Z, Chen C. Short-term weather forecast based on wavelet denoising and catboost. In: 2019 Chinese control conference (CCC). 2019; pp. 3760–4.

  52. Ghori KM, Abbasi RA, Awais M, Imran M, Ullah A, Szathmary L. Performance analysis of different types of machine learning classifiers for non-technical loss detection. IEEE Access. 2020;8:16033–48.

[Article](https://doi.org/10.1109%2FACCESS.2019.2962510) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Performance%20analysis%20of%20different%20types%20of%20machine%20learning%20classifiers%20for%20non-technical%20loss%20detection&journal=IEEE%20Access&doi=10.1109%2FACCESS.2019.2962510&volume=8&pages=16033-16048&publication_year=2020&author=Ghori%2CKM&author=Abbasi%2CRA&author=Awais%2CM&author=Imran%2CM&author=Ullah%2CA&author=Szathmary%2CL)

  53. de Jong JTA, Kleijn GAV, Kuijken KH, Valentijn EA. The kilo-degree survey. Exp Astron. 2013;35(1–2):25–44.

[Article](https://link.springer.com/doi/10.1007/s10686-012-9306-1) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=The%20kilo-degree%20survey&journal=Exp%20Astron&doi=10.1007%2Fs10686-012-9306-1&volume=35&issue=1%E2%80%932&pages=25-44&publication_year=2013&author=Jong%2CJTA&author=Kleijn%2CGAV&author=Kuijken%2CKH&author=Valentijn%2CEA)

  54. Abolfathi B, et al. The fourteenth data release of the sloan digital sky survey: first spectroscopic data from the extended Baryon oscillation spectroscopic survey and from the second phase of the apache point observatory galactic evolution experiment. Astrophys J Suppl Series. 2018;235(2):42.

[Article](https://doi.org/10.3847%2F1538-4365%2Faa9e8a) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=The%20fourteenth%20data%20release%20of%20the%20sloan%20digital%20sky%20survey%3A%20first%20spectroscopic%20data%20from%20the%20extended%20Baryon%20oscillation%20spectroscopic%20survey%20and%20from%20the%20second%20phase%20of%20the%20apache%20point%20observatory%20galactic%20evolution%20experiment&journal=Astrophys%20J%20Suppl%20Series&doi=10.3847%2F1538-4365%2Faa9e8a&volume=235&issue=2&publication_year=2018&author=Abolfathi%2CB)

  55. Leevy JL, Khoshgoftaar TM, Bauder RA, Seliya N. A survey on addressing high-class imbalance in big data. J Big Data. 2018;5(1):42.

[Article](https://link.springer.com/doi/10.1186/s40537-018-0151-6) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20survey%20on%20addressing%20high-class%20imbalance%20in%20big%20data&journal=J%20Big%20Data&doi=10.1186%2Fs40537-018-0151-6&volume=5&issue=1&publication_year=2018&author=Leevy%2CJL&author=Khoshgoftaar%2CTM&author=Bauder%2CRA&author=Seliya%2CN)

  56. Tomas M, Ilya S, Kai C, Corrado Greg S, Dean Jeff. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, 2013; pp. 3111–3119.

  57. Rajaraman A, Ullman JD. Mining massive datasets. Cambridge: Cambridge University Press; 2011.

[Book](https://doi.org/10.1017%2FCBO9781139058452) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Mining%20massive%20datasets&doi=10.1017%2FCBO9781139058452&publication_year=2011&author=Rajaraman%2CA&author=Ullman%2CJD)

  58. Buitinck L, Louppe G, Blondel M, Pedregosa F, Mueller A, Grisel O, Niculae V, Prettenhofer P, Gramfort A, Grobler J, et al. API design for machine learning software: experiences from the scikit-learn project. In: ECML PKDD workshop: languages for data mining and machine learning. 2013; pp. 108–122.

  59. Hand DJ. Measuring classifier performance: a coherent alternative to the area under the roc curve. Mach Learn. 2009;77(1):103–23.

[Article](https://link.springer.com/doi/10.1007/s10994-009-5119-5) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Measuring%20classifier%20performance%3A%20a%20coherent%20alternative%20to%20the%20area%20under%20the%20roc%20curve&journal=Mach%20Learn&doi=10.1007%2Fs10994-009-5119-5&volume=77&issue=1&pages=103-123&publication_year=2009&author=Hand%2CDJ)

  60. Schuster M, Paliwal KK. Bidirectional recurrent neural networks. IEEE Trans Signal Process. 1997;45(11):2673–81.

[Article](https://doi.org/10.1109%2F78.650093) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Bidirectional%20recurrent%20neural%20networks&journal=IEEE%20Trans%20Signal%20Process&doi=10.1109%2F78.650093&volume=45&issue=11&pages=2673-2681&publication_year=1997&author=Schuster%2CM&author=Paliwal%2CKK)

  61. Johnson R, Zhang T. Learning nonlinear functions using regularized greedy forest. IEEE Trans Pattern Anal Mach Intellig. 2014;36(5):942–54.

[Article](https://doi.org/10.1109%2FTPAMI.2013.159) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Learning%20nonlinear%20functions%20using%20regularized%20greedy%20forest&journal=IEEE%20Trans%20Pattern%20Anal%20Mach%20Intellig&doi=10.1109%2FTPAMI.2013.159&volume=36&issue=5&pages=942-954&publication_year=2014&author=Johnson%2CR&author=Zhang%2CT)

  62. Steptoe Andrew, Breeze Elizabeth, Banks James, Nazroo James. Cohort profile: the english longitudinal study of ageing. Int J Epidemiol. 2013;42(6):1640–8.

[Article](https://doi.org/10.1093%2Fije%2Fdys168) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Cohort%20profile%3A%20the%20english%20longitudinal%20study%20of%20ageing&journal=Int%20J%20Epidemiol&doi=10.1093%2Fije%2Fdys168&volume=42&issue=6&pages=1640-1648&publication_year=2013&author=Steptoe%2CAndrew&author=Breeze%2CElizabeth&author=Banks%2CJames&author=Nazroo%2CJames)

  63. Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP. synthetic minority over-sampling technique. Smote. 2002;16:321–57.

[MATH](http://www.emis.de/MATH-item?0994.68128) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=synthetic%20minority%20over-sampling%20technique&journal=Smote&volume=16&pages=321-357&publication_year=2002&author=Chawla%2CNV&author=Bowyer%2CKW&author=Hall%2CLO&author=Kegelmeyer%2CWP)

  64. He H, Bai Y, Garcia EA, Li S. Adasyn: adaptive synthetic sampling approach for imbalanced learning. In: 2008 IEEE international joint conference on neural networks (IEEE world congress on computational intelligence). IEEE, New York. 2008; pp. 1322–8.

  65. Herland M, Bauder RA, Khoshgoftaar TM. The effects of class rarity on the evaluation of supervised healthcare fraud detection models. J Big Data. 2019;6(1):1.

[Article](https://link.springer.com/doi/10.1186/s40537-019-0181-8) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=The%20effects%20of%20class%20rarity%20on%20the%20evaluation%20of%20supervised%20healthcare%20fraud%20detection%20models&journal=J%20Big%20Data&doi=10.1186%2Fs40537-019-0181-8&volume=6&issue=1&publication_year=2019&author=Herland%2CM&author=Bauder%2CRA&author=Khoshgoftaar%2CTM)

  66. Chollet F, et al. Keras. <https://keras.io>. 2015.

  67. Lundberg SM, Lee SI. A unified approach to interpreting model predictions. In: Guyon I, Luxburg UV, Bengio S, Wallach H, Fergus R, Vishwanathan S, Garnett R, editors. Advances in neural information processing systems. New York: Curran Associates; 2017. p. 4765–74.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20unified%20approach%20to%20interpreting%20model%20predictions&pages=4765-4774&publication_year=2017&author=Lundberg%2CSM&author=Lee%2CSI)

  68. Witten IH, Frank E. Data mining: practical machine learning tools and techniques with java implementations. ACM Sigmod Record. 2002;31(1):76–7.

[Article](https://doi.org/10.1145%2F507338.507355) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Data%20mining%3A%20practical%20machine%20learning%20tools%20and%20techniques%20with%20java%20implementations&journal=ACM%20Sigmod%20Record&doi=10.1145%2F507338.507355&volume=31&issue=1&pages=76-77&publication_year=2002&author=Witten%2CIH&author=Frank%2CE)

  69. Holte RC. Very simple classification rules perform well on most commonly used datasets. Mach Learn. 1993;11(1):63–90.

[Article](https://doi.org/10.1023%2FA%3A1022631118932) [MATH](http://www.emis.de/MATH-item?0850.68278) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Very%20simple%20classification%20rules%20perform%20well%20on%20most%20commonly%20used%20datasets&journal=Mach%20Learn&doi=10.1023%2FA%3A1022631118932&volume=11&issue=1&pages=63-90&publication_year=1993&author=Holte%2CRC)

  70. Quinlan JR. C4. 5: Programs for machine learning. 1993.

  71. Platt J. Sequential minimal optimization: a fast algorithm for training support vector machines. 1998.

  72. Webb GI. Multiboosting: a technique for combining boosting and wagging. Mach Learn. 2000;40(2):159–96.

[Article](https://doi.org/10.1023%2FA%3A1007659514849) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Multiboosting%3A%20a%20technique%20for%20combining%20boosting%20and%20wagging&journal=Mach%20Learn&doi=10.1023%2FA%3A1007659514849&volume=40&issue=2&pages=159-196&publication_year=2000&author=Webb%2CGI)

  73. Breiman L. Random forests. Mach Learn. 2001;45(1):5–32.

[Article](https://doi.org/10.1023%2FA%3A1010933404324) [MATH](http://www.emis.de/MATH-item?1007.68152) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Random%20forests&journal=Mach%20Learn&doi=10.1023%2FA%3A1010933404324&volume=45&issue=1&pages=5-32&publication_year=2001&author=Breiman%2CL)

  74. Barua S, Islam MM, Yao X, Murase K. Mwmote-majority weighted minority oversampling technique for imbalanced data set learning. IEEE Trans Knowl Data Eng. 2012;26(2):405–25.

[Article](https://doi.org/10.1109%2FTKDE.2012.232) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Mwmote-majority%20weighted%20minority%20oversampling%20technique%20for%20imbalanced%20data%20set%20learning&journal=IEEE%20Trans%20Knowl%20Data%20Eng.&doi=10.1109%2FTKDE.2012.232&volume=26&issue=2&pages=405-425&publication_year=2012&author=Barua%2CS&author=Islam%2CMM&author=Yao%2CX&author=Murase%2CK)

  75. Guyon I, Weston J, Barnhill S, Vapnik V. Gene selection for cancer classification using support vector machines. Mach Learn. 2002;46(1–3):389–422.

[Article](https://doi.org/10.1023%2FA%3A1012487302797) [MATH](http://www.emis.de/MATH-item?0998.68111) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Gene%20selection%20for%20cancer%20classification%20using%20support%20vector%20machines&journal=Mach%20Learn&doi=10.1023%2FA%3A1012487302797&volume=46&issue=1%E2%80%933&pages=389-422&publication_year=2002&author=Guyon%2CI&author=Weston%2CJ&author=Barnhill%2CS&author=Vapnik%2CV)

  76. Deng H, Runger G. Gene selection with guided regularized random forest. Pattern Recogn. 2013;46(12):3483–9.

[Article](https://doi.org/10.1016%2Fj.patcog.2013.05.018) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Gene%20selection%20with%20guided%20regularized%20random%20forest&journal=Pattern%20Recogn&doi=10.1016%2Fj.patcog.2013.05.018&volume=46&issue=12&pages=3483-3489&publication_year=2013&author=Deng%2CH&author=Runger%2CG)

  77. Friedman JH. Stochastic gradient boosting. Nonlinear methods and data mining. Comput Stat Data Anal. 2002;38(4):367–78.

[Article](https://doi.org/10.1016%2FS0167-9473%2801%2900065-2) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Stochastic%20gradient%20boosting.%20Nonlinear%20methods%20and%20data%20mining&journal=Comput%20Stat%20Data%20Anal&doi=10.1016%2FS0167-9473%2801%2900065-2&volume=38&issue=4&pages=367-378&publication_year=2002&author=Friedman%2CJH)

  78. Madalina-Mihaela B, Javier T-A, Pedro C-R, Antonio G. Detection of non-technical losses using smart meter data and supervised learning. IEEE Trans Smart Grid. 2018;10(3):2661–70.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Detection%20of%20non-technical%20losses%20using%20smart%20meter%20data%20and%20supervised%20learning.&journal=IEEE%20Trans%20Smart%20Grid&volume=10&issue=3&pages=2661-2670&publication_year=2018&author=Madalina-Mihaela%2CB&author=Javier%2CT-A&author=Pedro%2CC-R&author=Antonio%2CG)

  79. Bauder R, da Rosa R, Khoshgoftaar TM. Identifying medicare provider fraud with unsupervised machine learning. In: 2018 IEEE international conference on information Reuse and integration (IRI).

  80. Bauder RA, Khoshgoftaar TM. Medicare fraud detection using machine learning methods. In: 2017 16th IEEE international conference on machine learning and applications (ICMLA).

  81. Hancock J, Khoshgoftaar TM. Medicare fraud detection using catboost. In: 2020 IEEE 21st international conference on information reuse and integration for data science (IRI). IEEE. 2020: pp. 97–103.

  82. Hancock J, Khoshgoftaar TM. Performance of catboost and xgboost in medicare fraud detection. In: 19th IEEE international conference on machine learning and applications (ICMLA); IEEE, New York. 2020.

  83. Hochreiter S, Schmidhuber J. Lstm can solve hard long time lag problems. In: Advances in neural information processing systems. 1997; pp. 473–9.

  84. Ilya S, Oriol V, Le Quoc V. Sequence to sequence learning with neural networks. Advances in neural information processing systems. 2014; pp. 3104–3112.

  85. De Myttenaere A, Golden B, Le Grand B, Rossi F. Mean absolute percentage error for regression models. Neurocomputing. 2016;192:38–48.

[Article](https://doi.org/10.1016%2Fj.neucom.2015.12.114) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Mean%20absolute%20percentage%20error%20for%20regression%20models&journal=Neurocomputing&doi=10.1016%2Fj.neucom.2015.12.114&volume=192&pages=38-48&publication_year=2016&author=Myttenaere%2CA&author=Golden%2CB&author=Grand%2CB&author=Rossi%2CF)

  86. Nakagawa Shinichi, Schielzeth Holger. A general and simple method for obtaining r2 from generalized linear mixed-effects models. Methods Ecol Evol. 2013;4(2):133–42.

[Article](https://doi.org/10.1111%2Fj.2041-210x.2012.00261.x) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20general%20and%20simple%20method%20for%20obtaining%20r2%20from%20generalized%20linear%20mixed-effects%20models&journal=Methods%20Ecol%20Evol&doi=10.1111%2Fj.2041-210x.2012.00261.x&volume=4&issue=2&pages=133-142&publication_year=2013&author=Nakagawa%2CShinichi&author=Schielzeth%2CHolger)

  87. Cortes C, Vapnik V. Support-vector networks. Mach Learn. 1995;20(3):273–97.

[MATH](http://www.emis.de/MATH-item?0831.68098) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Support-vector%20networks&journal=Mach%20Learn&volume=20&issue=3&pages=273-297&publication_year=1995&author=Cortes%2CC&author=Vapnik%2CV)

  88. Goodfellow I, Bengio Y, Courville A. Deep learning. New York: MIT Press; 2016. <http://www.deeplearningbook.org>.

  89. Brodersen KH, Ong CS, Stephan KE, Buhmann JM. The balanced accuracy and its posterior distribution. In: 2010 20th international conference on pattern recognition. 2010; pp. 3121–4.

  90. Shvai N, Hasnat A, Meicler A, Nakib A. Accurate classification for automatic vehicle-type recognition based on ensemble classifiers. IEEE Trans Intell Transportation Syst. 2020;21(3):1288–97.

[Article](https://doi.org/10.1109%2FTITS.2019.2906821) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Accurate%20classification%20for%20automatic%20vehicle-type%20recognition%20based%20on%20ensemble%20classifiers&journal=IEEE%20Trans%20Intell%20Transportation%20Syst&doi=10.1109%2FTITS.2019.2906821&volume=21&issue=3&pages=1288-1297&publication_year=2020&author=Shvai%2CN&author=Hasnat%2CA&author=Meicler%2CA&author=Nakib%2CA)

  91. Lecun Y, Bottou L, Bengio Y, Haffner P. Gradient-based learning applied to document recognition. Proc IEEE. 1998;86(11):2278–324.

[Article](https://doi.org/10.1109%2F5.726791) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Gradient-based%20learning%20applied%20to%20document%20recognition&journal=Proc%20IEEE&doi=10.1109%2F5.726791&volume=86&issue=11&pages=2278-2324&publication_year=1998&author=Lecun%2CY&author=Bottou%2CL&author=Bengio%2CY&author=Haffner%2CP)

  92. University of New Brunswick. Intrusion detection evaluation dataset (cicids2017). <https://www.unb.ca/cic/datasets/ids-2017.html>, 1 2020. (Online). Accessed 18 March 2020.

  93. Maryam MN, Taghi MK, Clifford Kemp, Seliya N, Richard Z. Machine learning for detecting brute force attacks at the network level. In _2014 IEEE International Conference on Bioinformatics and Bioengineering_. IEEE, New York. 2014; pp. 379–385.

  94. Najafabadi MM, Khoshgoftaar TM, Napolitano A. Detecting network attacks based on behavioral commonalities. Int J Reliability Quality Safety Eng. 2016;23(01):1650005.

[Article](https://doi.org/10.1142%2FS0218539316500054) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Detecting%20network%20attacks%20based%20on%20behavioral%20commonalities&journal=Int%20J%20Reliability%20Quality%20Safety%20Eng&doi=10.1142%2FS0218539316500054&volume=23&issue=01&publication_year=2016&author=Najafabadi%2CMM&author=Khoshgoftaar%2CTM&author=Napolitano%2CA)

  95. Wald Randall, Khoshgoftaar Taghi M. Richard Zuech, and Amri Napolitano. Network traffic prediction models for near-and long-term predictions. In _2014 IEEE International Conference on Bioinformatics and Bioengineering_ , 2014; IEEE, New York. pp. 362–368.

  96. Tanase C, Ogrezeanu I, Badiu C. Molecular pathology of pituitary adenomas. Netherlands: Elsevier; 2011.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Molecular%20pathology%20of%20pituitary%20adenomas&publication_year=2011&author=Tanase%2CC&author=Ogrezeanu%2CI&author=Badiu%2CC)

  97. Fang Y, Fullwood MJ. Roles, functions, and mechanisms of long non-coding rnas in cancer. Genom Proteom Bioinf. 2016;14(1):42–54.

[Article](https://doi.org/10.1016%2Fj.gpb.2015.09.006) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Roles%2C%20functions%2C%20and%20mechanisms%20of%20long%20non-coding%20rnas%20in%20cancer&journal=Genom%20Proteom%20Bioinf&doi=10.1016%2Fj.gpb.2015.09.006&volume=14&issue=1&pages=42-54&publication_year=2016&author=Fang%2CY&author=Fullwood%2CMJ)

  98. Brawerman G. Eukaryotic messenger RNA. Ann Rev Biochem. 1974;43(1):621–42.

[Article](https://doi.org/10.1146%2Fannurev.bi.43.070174.003201) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Eukaryotic%20messenger%20RNA&journal=Ann%20Rev%20Biochem&doi=10.1146%2Fannurev.bi.43.070174.003201&volume=43&issue=1&pages=621-642&publication_year=1974&author=Brawerman%2CG)

  99. Chen L-L, Yang L. Regulation of circrna biogenesis. RNA Biol. 2015;12(4):381–8.

[Article](https://doi.org/10.1080%2F15476286.2015.1020271) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Regulation%20of%20circrna%20biogenesis&journal=RNA%20Biol&doi=10.1080%2F15476286.2015.1020271&volume=12&issue=4&pages=381-388&publication_year=2015&author=Chen%2CL-L&author=Yang%2CL)

  100. Ou M, Cui P, Pei J, Zhang Z, Zhu W. Asymmetric transitivity preserving graph embedding. In: Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining. 2016; p. 1105–1114.

  101. Freund Y, Schapire RE. A desicion-theoretic generalization of on-line learning and an application to boosting. In: European conference on computational learning theory. Springer. 1995; p 23–37.

  102. Wang Y, Ma K, Garcia-Hernandez L, Chen J, Hou Z, Ji K, Chen Z, Abraham A. A clstm-tmn for marketing intention detection. Eng Appl Artificial Intell. 2020;91:103595.

[Article](https://doi.org/10.1016%2Fj.engappai.2020.103595) [ Google Scholar](http://scholar.google.com/scholar_lookup?&title=A%20clstm-tmn%20for%20marketing%20intention%20detection&journal=Eng%20Appl%20Artificial%20Intell&doi=10.1016%2Fj.engappai.2020.103595&volume=91&publication_year=2020&author=Wang%2CY&author=Ma%2CK&author=Garcia-Hernandez%2CL&author=Chen%2CJ&author=Hou%2CZ&author=Ji%2CK&author=Chen%2CZ&author=Abraham%2CA)

  103. National Cancer Institute. Clear cell renal cell carcinoma. 2020. <https://www.cancer.gov/pediatric-adult-rare-tumor/rare-tumors/rare-kidney-tumors/clear-cell-renal-cell-carcinoma>. Accessed 9 June 2020.

  104. Sharma N, Aggarwal LM. Automated medical image segmentation techniques. J Med Phys Assoc Med Phys India. 2010;35(1):3.

[ Google Scholar](http://scholar.google.com/scholar_lookup?&title=Automated%20medical%20image%20segmentation%20techniques&journal=J%20Med%20Phys%20Assoc%20Med%20Phys%20India&volume=35&issue=1&publication_year=2010&author=Sharma%2CN&author=Aggarwal%2CLM)




[Download references](https://citation-needed.springer.com/v2/references/10.1186/s40537-020-00369-8?format=refman&flavour=references)

## Acknowledgements

The authors would like to thank the anonymous reviewers for their constructive evaluation of this paper, and the various members of the Data Mining and Machine Learning Laboratory, Florida Atlantic University, for assistance with the reviews.

## Funding

Not applicable.

## Author information

### Authors and Affiliations

  1. Florida Atlantic University, 777 Glades Road, Boca Raton, FL, USA

John T. Hancock & Taghi M. Khoshgoftaar




Authors

  1. John T. Hancock

[View author publications](https://www.biomedcentral.com/search?query=author%23John%20T.%20Hancock)

You can also search for this author in [PubMed](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=search&term=John%20T.%20Hancock) [Google Scholar](http://scholar.google.co.uk/scholar?as_q=&num=10&btnG=Search+Scholar&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=%22John%20T.%20Hancock%22&as_publication=&as_ylo=&as_yhi=&as_allsubj=all&hl=en)

  2. Taghi M. Khoshgoftaar

[View author publications](https://www.biomedcentral.com/search?query=author%23Taghi%20M.%20Khoshgoftaar)

You can also search for this author in [PubMed](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=search&term=Taghi%20M.%20Khoshgoftaar) [Google Scholar](http://scholar.google.co.uk/scholar?as_q=&num=10&btnG=Search+Scholar&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=%22Taghi%20M.%20Khoshgoftaar%22&as_publication=&as_ylo=&as_yhi=&as_allsubj=all&hl=en)




### Contributions

JTH performed the literature review and drafted the manuscript. TMK worked with JTH to develop the article’s framework and focus. TMK introduced this topic to JTH. All authors read and approved the final manuscript.

### Corresponding author

Correspondence to [John T. Hancock](mailto:jhancoc4@fau.edu).

## Ethics declarations

### Ethics approval and consent to participate

Not applicable.

### Consent for publication

Not applicable.

### Competing interests

The authors declare that they have no competing interests.

## Additional information

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit <http://creativecommons.org/licenses/by/4.0/>.

[Reprints and permissions](https://s100.copyright.com/AppDispatchServlet?title=CatBoost%20for%20big%20data%3A%20an%20interdisciplinary%20review&author=John%20T.%20Hancock%20et%20al&contentID=10.1186%2Fs40537-020-00369-8&copyright=The%20Author%28s%29&publication=2196-1115&publicationDate=2020-11-04&publisherName=SpringerNature&orderBeanReset=true&oa=CC%20BY)

## About this article


### Cite this article

Hancock, J.T., Khoshgoftaar, T.M. CatBoost for big data: an interdisciplinary review. _J Big Data_ **7** , 94 (2020). https://doi.org/10.1186/s40537-020-00369-8

[Download citation](https://citation-needed.springer.com/v2/references/10.1186/s40537-020-00369-8?format=refman&flavour=citation)

  * Received: 05 August 2020

  * Accepted: 19 October 2020

  * Published: 04 November 2020

  * DOI: https://doi.org/10.1186/s40537-020-00369-8




### Share this article

Anyone you share the following link with will be able to read this content:

Get shareable link

Sorry, a shareable link is not currently available for this article.

Copy to clipboard

Provided by the Springer Nature SharedIt content-sharing initiative 

### Keywords

  * [CatBoost](/search?query=CatBoost&facet-discipline="Computer%20Science")
  * [Big data](/search?query=Big%20data&facet-discipline="Computer%20Science")
  * [Categorical variable encoding](/search?query=Categorical%20variable%20encoding&facet-discipline="Computer%20Science")
  * [Ensemble methods](/search?query=Ensemble%20methods&facet-discipline="Computer%20Science")
  * [Machine learning](/search?query=Machine%20learning&facet-discipline="Computer%20Science")
  * [Decision tree](/search?query=Decision%20tree&facet-discipline="Computer%20Science")



[ Download PDF ](//journalofbigdata.springeropen.com/counter/pdf/10.1186/s40537-020-00369-8.pdf)

[ Download ePub ](//journalofbigdata.springeropen.com/counter/epub/10.1186/s40537-020-00369-8.epub)

Advertisement

[ ![Advertisement](//pubads.g.doubleclick.net/gampad/ad?iu=/270604982/springer_open/journalofbigdata/articles&sz=300x250&pos=MPU1&doi=10.1186/s40537-020-00369-8&type=article&kwrd=CatBoost,Big data,Categorical variable encoding,Ensemble methods,Machine learning,Decision tree&pmc=I18024,I18032,I18030,M14026,M13110,T24035&) ](//pubads.g.doubleclick.net/gampad/jump?iu=/270604982/springer_open/journalofbigdata/articles&sz=300x250&pos=MPU1&doi=10.1186/s40537-020-00369-8&type=article&kwrd=CatBoost,Big data,Categorical variable encoding,Ensemble methods,Machine learning,Decision tree&pmc=I18024,I18032,I18030,M14026,M13110,T24035&)

![](/track/article/10.1186/s40537-020-00369-8)

  * [Support and Contact](https://support.biomedcentral.com/support/home)
  * [Jobs](//www.springeropen.com/about/jobs)
  * [Language editing for authors](https://authorservices.springernature.com/language-editing/)
  * [Scientific editing for authors](https://authorservices.springernature.com/scientific-editing/)
  * [Leave feedback](https://biomedcentral.typeform.com/to/VLXboo)


  * [Terms and conditions](//www.springeropen.com/terms-and-conditions)
  * [Privacy statement](//www.springeropen.com/privacy-statement)
  * [Accessibility](//www.springeropen.com/accessibility)
  * [Cookies](//www.springeropen.com/cookies)



### Follow SpringerOpen

  * [ SpringerOpen Twitter page ](https://twitter.com/springeropen)
  * [ SpringerOpen Facebook page ](https://www.facebook.com/SpringerOpn)



By using this website, you agree to our [Terms and Conditions](//www.springeropen.com/terms-and-conditions), [Your US state privacy rights](https://www.springernature.com/ccpa), [Privacy statement](//www.springeropen.com/privacy-statement) and [Cookies](//www.springeropen.com/cookies) policy. [Your privacy choices/Manage cookies](javascript:void\(0\);) we use in the preference centre. 

![Springer Nature](/static/images/logo-springernature-acb40b85fb.svg)

(C) 2025 BioMed Central Ltd unless otherwise stated. Part of [Springer Nature](https://www.springernature.com). 
  *[DOI]: Digital Object Identifier


title: www.spiedigitallibrary.org
content: Request unsuccessful. Incapsula incident ID: 7232000280218855357-319445494558361355
scrape_date: 2025-03-14T14:02:22.423842
content_type: markdown
hash: 832fefbd28e9a06f9eecf2b4c1a8d6989136e2416529d34211e3517e4b50d417
url:
https://www.spiedigitallibrary.org/conference-proceedings-of-spie/12287/1228704/Basic-search-algorithms-in-Python/10.1117/12.2640473.short


url: https://www.geeksforgeeks.org/python-program-for-binary-search/
title: Binary Search (Recursive and Iterative) - Python - GeeksforGeeks
scrape_date: 2025-03-14T14:02:22.665216
content_type: markdown
hash: 160b7165c19001462bbe97c1724b41bc08d1770da767f43bf704d6151b7e86c0
content:
Skip to content [ ![geeksforgeeks](https://media.geeksforgeeks.org/gfg-gg-logo.svg) ](https://www.geeksforgeeks.org/)

  * Courses __
    * [DSA to Development](https://www.geeksforgeeks.org/courses/dsa-to-development-coding-guide?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
    * [Machine Learning & Data Science](https://www.geeksforgeeks.org/courses/data-science-live?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
    * [Generative AI & ChatGPT](https://www.geeksforgeeks.org/courses/mastering-generative-ai-and-chat-gpt?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
    * [Become AWS Certified](https://www.geeksforgeeks.org/courses/search?query=AWS&itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
    * DSA Courses __
      * [Data Structure& Algorithm(C++/JAVA)](https://www.geeksforgeeks.org/courses/dsa-self-paced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
      * [Data Structure & Algorithm(Python)](https://www.geeksforgeeks.org/courses/Data-Structures-With-Python?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
      * [Data Structure & Algorithm(JavaScript)](https://www.geeksforgeeks.org/courses/data-structures-and-algorithms-in-javascript?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
    * Programming Languages __
      * [CPP](https://www.geeksforgeeks.org/courses/cpp-programming-basic-to-advanced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
      * [Java](https://www.geeksforgeeks.org/courses/Java-Programming-basic-to-advanced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
      * [Python](https://www.geeksforgeeks.org/courses/Python-Foundation?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
      * [JavaScript](https://www.geeksforgeeks.org/courses/javascript?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
      * [C](https://www.geeksforgeeks.org/courses/c-Programming-basic-to-advanced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
    * [All Courses](https://www.geeksforgeeks.org/courses?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses)
  * Tutorials __
    * Python __
      * [Python Tutorial](https://www.geeksforgeeks.org/python-programming-language-tutorial/?ref=outind)
      * [Python Programs](https://www.geeksforgeeks.org/python-programming-examples/?ref=outind)
      * [Python Quiz](https://www.geeksforgeeks.org/python-quizzes/?ref=outind)
      * [Python Projects](https://www.geeksforgeeks.org/python-projects-beginner-to-advanced/?ref=outind)
      * [Python Interview Questions](https://www.geeksforgeeks.org/python-interview-questions/?ref=outind)
      * [Python Data Structures](https://www.geeksforgeeks.org/python-data-structures-and-algorithms/?ref=outind)
    * Java __
      * [Java Tutorial](https://www.geeksforgeeks.org/java/?ref=outind)
      * [Java Collections](https://www.geeksforgeeks.org/collections-in-java-2/?ref=outind)
      * [Java 8 Tutorial](https://www.geeksforgeeks.org/java-8-features/?ref=outind)
      * [Java Programs](https://www.geeksforgeeks.org/java-programming-examples/?ref=outind)
      * [Java Quiz](https://www.geeksforgeeks.org/java-multiple-choice-questions/?ref=outind)
      * [Java Projects](https://www.geeksforgeeks.org/java-projects/?ref=outind)
      * [Java Interview Questions](https://www.geeksforgeeks.org/java-interview-questions/?ref=outind)
      * [Advanced Java](https://www.geeksforgeeks.org/advanced-java/?ref=outind)
    * Programming Languages __
      * [JavaScript](https://www.geeksforgeeks.org/javascript/?ref=outind)
      * [C++](https://www.geeksforgeeks.org/c-plus-plus/?ref=outind)
      * [R Tutorial](https://www.geeksforgeeks.org/r-tutorial/?ref=outind)
      * [SQL](https://www.geeksforgeeks.org/sql-tutorial/?ref=outind)
      * [PHP](https://www.geeksforgeeks.org/php-tutorial/?ref=outind)
      * [C#](https://www.geeksforgeeks.org/csharp-programming-language/?ref=outind)
      * [C](https://www.geeksforgeeks.org/c-programming-language/?ref=outind)
      * [Scala](https://www.geeksforgeeks.org/scala-programming-language/?ref=outind)
      * [Perl](https://www.geeksforgeeks.org/perl-programming-language/?ref=outind)
      * [Go Language](https://www.geeksforgeeks.org/golang/?ref=outind)
      * [Kotlin](https://www.geeksforgeeks.org/kotlin-programming-language/?ref=outind)
    * Interview Corner __
      * [System Design Tutorial](https://www.geeksforgeeks.org/system-design-tutorial/?ref=outind)
      * [Company Preparation](https://www.geeksforgeeks.org/company-preparation/?ref=outind)
      * [Top Topics](https://www.geeksforgeeks.org/interview-preparation-for-software-developer/?ref=outind)
      * [Practice Company Questions](https://practice.geeksforgeeks.org/company-tags/?ref=outind)
      * [Interview Experiences](https://www.geeksforgeeks.org/company-interview-corner/?ref=outind)
      * [Experienced Interviews](https://www.geeksforgeeks.org/experienced-interview-experiences-company-wise/?ref=outind)
      * [Internship Interviews](https://www.geeksforgeeks.org/internship-interview-experiences-company-wise/?ref=outind)
      * [Competitive Programming](https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/?ref=outind)
      * [Multiple Choice Quizzes](https://www.geeksforgeeks.org/quiz-corner-gq/?ref=outind)
      * [Aptitude for Placements](https://www.geeksforgeeks.org/aptitude-questions-and-answers/?ref=outind)
    * Computer Science Subjects __
      * [Operating System](https://www.geeksforgeeks.org/operating-systems/?ref=outind)
      * [DBMS](https://www.geeksforgeeks.org/dbms/?ref=outind)
      * [Computer Networks](https://www.geeksforgeeks.org/computer-network-tutorials/?ref=outind)
      * [Engineering Mathematics](https://www.geeksforgeeks.org/engineering-mathematics-tutorials/?ref=outind)
      * [Computer Organization and Architecture](https://www.geeksforgeeks.org/computer-organization-and-architecture-tutorials/?ref=outind)
      * [Theory of Computation](https://www.geeksforgeeks.org/theory-of-computation-automata-tutorials/?ref=outind)
      * [Compiler Design](https://www.geeksforgeeks.org/compiler-design-tutorials/?ref=outind)
      * [Digital Logic](https://www.geeksforgeeks.org/digital-electronics-logic-design-tutorials/#blg/?ref=outind)
      * [Software Engineering](https://www.geeksforgeeks.org/software-engineering/?ref=outind)
    * DevOps and Linux __
      * [DevOps Tutorial](https://www.geeksforgeeks.org/devops-tutorial/?ref=ghm)
      * [GIT](https://www.geeksforgeeks.org/git-tutorial/?ref=outind)
      * [AWS](https://www.geeksforgeeks.org/aws-tutorial/?ref=outind)
      * [Docker](https://www.geeksforgeeks.org/docker-tutorial/?ref=outind)
      * [Kubernetes](https://www.geeksforgeeks.org/kubernetes-tutorial/?ref=outind)
      * [Microsoft Azure Tutorial](https://www.geeksforgeeks.org/microsoft-azure/?ref=outind)
      * [Google Cloud Platform](https://www.geeksforgeeks.org/google-cloud-platform-tutorial/?ref=outind)
      * [Linux Tutorial](https://www.geeksforgeeks.org/linux-tutorial/?ref=outind)
    * Software Testing __
      * [Software Testing Tutorial](https://www.geeksforgeeks.org/software-testing-tutorial/?ref=outind)
      * [Software Engineering Tutorial](https://www.geeksforgeeks.org/software-engineering/?ref=outind)
      * [Testing Interview Questions](https://www.geeksforgeeks.org/software-testing-interview-questions/?ref=outind)
      * [Jira](https://www.geeksforgeeks.org/jira-tutorial/?ref=outind)
    * Databases __
      * [DBMS Tutorial](https://www.geeksforgeeks.org/dbms/?ref=outind)
      * [SQL Tutorial](https://www.geeksforgeeks.org/sql-tutorial/?ref=outind)
      * [PostgreSQL Tutorial](https://www.geeksforgeeks.org/postgresql-tutorial/?ref=outind)
      * [MongoDB Tutorial](https://www.geeksforgeeks.org/mongodb-tutorial/?ref=outind)
      * [SQL Interview Questions](https://www.geeksforgeeks.org/sql-interview-questions/?ref=outind)
      * [MySQL Interview Questions](https://www.geeksforgeeks.org/mysql-interview-questions/?ref=outind)
      * [PL/SQL Interview Questions](https://www.geeksforgeeks.org/pl-sql-interview-questions/?ref=outind)
    * Android __
      * [Android Tutorial](https://www.geeksforgeeks.org/android-tutorial/?ref=outind)
      * [Android Studio Tutorial](https://www.geeksforgeeks.org/android-studio-tutorial/?ref=outind)
      * [Kotlin For Android](https://www.geeksforgeeks.org/kotlin-android-tutorial/?ref=outind)
      * [Android Projects](https://www.geeksforgeeks.org/android-projects-from-basic-to-advanced-level/?ref=outind)
      * [Android Interview Questions](https://www.geeksforgeeks.org/top-50-android-interview-questions-answers-sde-i-to-sde-iii/?ref=outind)
      * [6 Weeks of Android App Development](https://www.geeksforgeeks.org/6-weeks-of-android-app-development-free-project-based-learning/?ref=outind)
    * Excel __
      * [MS Excel Tutorial](https://www.geeksforgeeks.org/excel-tutorial/?ref=outind)
      * [Introduction to MS Excel](https://www.geeksforgeeks.org/introduction-to-ms-excel/?ref=outind)
      * [Data Analysis in Excel](https://www.geeksforgeeks.org/data-analysis-in-excel/?ref=outind)
      * [Basic Excel Formulas & Functions](https://www.geeksforgeeks.org/basic-excel-formulas-and-functions/?ref=outind)
      * [Data Analysis in Advanced Excel](https://www.geeksforgeeks.org/instant-data-analysis-in-advanced-excel/?ref=outind)
      * [Workbooks](https://www.geeksforgeeks.org/workbooks-in-microsoft-excel/?ref=outind)
      * [Statistical Functions](https://www.geeksforgeeks.org/statistical-functions-in-excel-with-examples/?ref=outind)
      * [Data Visualization in Excel](https://www.geeksforgeeks.org/data-visualization-in-excel/?ref=outind)
      * [Pivot Tables in Excel](https://www.geeksforgeeks.org/pivot-tables-in-excel/?ref=outind)
      * [Excel Spreadsheets in Python](https://www.geeksforgeeks.org/working-with-excel-spreadsheets-in-python/?ref=outind)
      * [Basic Excel Shortcuts](https://www.geeksforgeeks.org/basic-excel-shortcuts/?ref=outind)
    * Mathematics __
      * [Number System](https://www.geeksforgeeks.org/number-theory/?ref=outind)
      * [Algebra](https://www.geeksforgeeks.org/algebra/?ref=outind)
      * [Linear Algebra](https://www.geeksforgeeks.org/linear-algebra/?ref=outind)
      * [Trigonometry](https://www.geeksforgeeks.org/math-trigonometry/?ref=outind)
      * [Set Theory](https://www.geeksforgeeks.org/set-theory/?ref=outind)
      * [Statistics](https://www.geeksforgeeks.org/statistics/?ref=outind)
      * [Probability](https://www.geeksforgeeks.org/probability-in-maths/?ref=outind)
      * [Geometry](https://www.geeksforgeeks.org/geometry/?ref=outind)
      * [Mensuration](https://www.geeksforgeeks.org/mensuration/?ref=outind)
      * [Logarithms](https://www.geeksforgeeks.org/logarithms/?ref=outind)
      * [Calculus](https://www.geeksforgeeks.org/math-calculus/?ref=outind)
  * DSA __
    * [DSA Tutorial](https://www.geeksforgeeks.org/learn-data-structures-and-algorithms-dsa-tutorial/?ref=outind)
    * Practice __
      * [Practice Coding Problems](https://www.geeksforgeeks.org/geeksforgeeks-practice-best-online-coding-platform/?itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header)
      * [Problem of the Day](https://www.geeksforgeeks.org/problem-of-the-day?itm_source=geeksforgeeksitm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header)
      * [GfG SDE Sheet](https://www.geeksforgeeks.org/explore?page=1&curated\[\]=1&sortBy=submissions&curated_names\[\]=SDE Sheet?itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header)
    * [Competitive Programming](https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/?ref=outind)
    * Company Wise SDE Sheets __
      * [Facebook SDE Sheet](https://www.geeksforgeeks.org/facebookmeta-sde-sheet-interview-questions-and-answers/?ref=outind)
      * [Amazon SDE Sheet](https://www.geeksforgeeks.org/amazon-sde-sheet-interview-questions-and-answers/?ref=outind)
      * [Apple SDE Sheet](https://www.geeksforgeeks.org/apple-sde-sheet-interview-questions-and-answers/?ref=outind)
      * [Netflix SDE Sheet](https://www.geeksforgeeks.org/netflix-sde-sheet-interview-questions-and-answers/?ref=outind)
      * [Google SDE Sheet](https://www.geeksforgeeks.org/google-sde-sheet-interview-questions-and-answers/?ref=outind)
    * [Top Interview Questions](https://www.geeksforgeeks.org/top-100-data-structure-and-algorithms-dsa-interview-questions-topic-wise/?ref=outind)
    * Puzzles __
      * [All Puzzles](https://www.geeksforgeeks.org/puzzles/?ref=outind)
      * [Top 100 Puzzles Asked In Interviews](https://www.geeksforgeeks.org/top-100-puzzles-asked-in-interviews/?ref=outind)
      * [Top 20 Puzzles Commonly Asked During SDE Interviews](https://www.geeksforgeeks.org/top-20-puzzles-commonly-asked-during-sde-interviews/?ref=outind)
  * Data Science __
    * [Python Tutorial](https://www.geeksforgeeks.org/python-programming-language/?ref=outind)
    * [R Tutorial](https://www.geeksforgeeks.org/r-tutorial/?ref=outind)
    * [Machine Learning](https://www.geeksforgeeks.org/machine-learning/?ref=outind)
    * [Data Science using Python](https://www.geeksforgeeks.org/data-science-with-python-tutorial/?ref=outind)
    * [Data Science using R](https://www.geeksforgeeks.org/r-programming-for-data-science/?ref=outind)
    * Data Science Packages __
      * [Pandas Tutorial](https://www.geeksforgeeks.org/pandas-tutorial/?ref=outind)
      * [NumPy Tutorial](https://www.geeksforgeeks.org/numpy-tutorial/?ref=outind)
    * Data Visualization __
      * [Python Data Visualization Tutorial](https://www.geeksforgeeks.org/python-data-visualization-tutorial/?ref=outind)
      * [Data Visualization with R](https://www.geeksforgeeks.org/data-visualization-in-r/?ref=outind)
    * Data Analysis __
      * [Data Analysis with Python](https://www.geeksforgeeks.org/data-analysis-with-python/?ref=outind)
      * [Data Analysis with R](https://www.geeksforgeeks.org/data-analysis-using-r/?ref=outind)
    * [Deep Learning](https://www.geeksforgeeks.org/deep-learning-tutorial/?ref=outind)
    * [NLP Tutorial](https://www.geeksforgeeks.org/natural-language-processing-nlp-tutorial/?ref=outind)
  * Web Tech __
    * [HTML Tutorial](https://www.geeksforgeeks.org/html-tutorial/?ref=outind)
    * [CSS Tutorial](https://www.geeksforgeeks.org/css-tutorial/?ref=outind)
    * [JavaScript Tutorial](https://www.geeksforgeeks.org/javascript/?ref=outind)
    * [PHP Tutorial](https://www.geeksforgeeks.org/php-tutorial/?ref=outind)
    * [ReactJS Tutorial](https://www.geeksforgeeks.org/react-tutorial/?ref=outind)
    * [NodeJS Tutorial](https://www.geeksforgeeks.org/nodejs/?ref=outind)
    * [Bootstrap Tutorial](https://www.geeksforgeeks.org/bootstrap/?ref=outind)
    * [Typescript](https://www.geeksforgeeks.org/typescript/?ref=outind)
    * Web Development Using Python __
      * [Django Tutorial](https://www.geeksforgeeks.org/django-tutorial/?ref=outind)
      * [Flask Tutorial](https://www.geeksforgeeks.org/flask-tutorial/?ref=outind)
      * [Postman](https://www.geeksforgeeks.org/postman-tutorial/?ref=outind)
      * [Github](https://www.geeksforgeeks.org/introduction-to-github/?ref=outind)
    * Cheat Sheets __
      * [HTML Cheat Sheet](https://www.geeksforgeeks.org/html-cheat-sheet-a-basic-guide-to-html/?ref=outind)
      * [CSS Cheat Sheet](https://www.geeksforgeeks.org/css-cheat-sheet-a-basic-guide-to-css/?ref=outind)
      * [JavaScript Cheat Sheet](https://www.geeksforgeeks.org/javascript-cheat-sheet-a-basic-guide-to-javascript/?ref=outind)
      * [React Cheat Sheet](https://www.geeksforgeeks.org/react-cheat-sheet/?ref=outind)
      * [Angular Cheat Sheet](https://www.geeksforgeeks.org/angular-cheat-sheet-a-basic-guide-to-angular/?ref=outind)
      * [jQuery Cheat Sheet](https://www.geeksforgeeks.org/jquery-cheat-sheet-a-basic-guide-to-jquery/?ref=outind)
      * [Bootstrap Cheat Sheet](https://www.geeksforgeeks.org/bootstrap-cheatsheet-a-basic-guide-to-bootstrap/?ref=outind)
    * [Learn Complete Web Development](https://www.geeksforgeeks.org/web-development/?ref=outind)


  * __ __ __

  * __

  * __
  * 


__

  * [Python Tutorial](https://www.geeksforgeeks.org/python-programming-language-tutorial/?ref=shm)
  * [Interview Questions](https://www.geeksforgeeks.org/python-interview-questions/?ref=shm)
  * [Python Quiz](https://www.geeksforgeeks.org/python-quizzes/?ref=shm)
  * [Python Projects](https://www.geeksforgeeks.org/python-projects-beginner-to-advanced/?ref=shm)
  * [Practice Python](https://www.geeksforgeeks.org/python-exercises-practice-questions-and-solutions/?ref=shm)
  * [Data Science With Python](https://www.geeksforgeeks.org/data-science-with-python-tutorial/?ref=shm)
  * [Python Web Dev](https://www.geeksforgeeks.org/python-web-development-django/?ref=shm)
  * [DSA with Python](https://www.geeksforgeeks.org/python-data-structures-and-algorithms/?ref=shm)
  * [Python OOPs](https://www.geeksforgeeks.org/python-oops-concepts/?ref=shm)
  * [Lists](https://www.geeksforgeeks.org/python-lists/?ref=shm)
  * [Strings](https://www.geeksforgeeks.org/python-string/?ref=shm)
  * [Dictionary](https://www.geeksforgeeks.org/python-dictionary/?ref=shm)

__

▲

[ Open In App ](https://geeksforgeeksapp.page.link/?link=https://www.geeksforgeeks.org/python-program-for-binary-search/?type%3Darticle%26id%3D155897&apn=free.programming.programming&isi=1641848816&ibi=org.geeksforgeeks.GeeksforGeeksDev&efr=1)

[ Next Article: Program to print the pattern 'G' ![Next article icon](https://media.geeksforgeeks.org/auth-dashboard-uploads/ep_right.svg) ](https://www.geeksforgeeks.org/program-print-pattern-g/?ref=next_article_top)

# Binary Search (Recursive and Iterative) - Python

Last Updated :  21 Feb, 2025

Summarize

__

Comments

__

Improve

__

  *   *   * 


__ Suggest changes

Like Article

__ Like

__ Share

__ Report

[ ![News](https://media.geeksforgeeks.org/auth-dashboard-uploads/Google-news.svg) Follow ](https://news.google.com/publications/CAAqBwgKMLTrzwsw44bnAw?hl=en-IN&gl=IN&ceid=IN%3Aen)

****Binary Search****  ****Algorithm  ****is a [searching algorithm](https://www.geeksforgeeks.org/searching-algorithms/) used in a sorted array by ****repeatedly dividing the search interval in half****. The idea of binary search is to use the information that the array is sorted and reduce the time complexity to O(log N). 

Below is the step-by-step algorithm for Binary Search:

  * Divide the search space into two halves by [****finding the middle index “mid”****](https://www.geeksforgeeks.org/problem-binary-search-implementations/). 
  * Compare the middle element of the search space with the ****key****. 
  * If the ****key  ****is found at middle element, the process is terminated.
  * If the ****key  ****is not found at middle element, choose which half will be used as the next search space.
    * If the ****key  ****is smaller than the middle element, then the ****left  ****side is used for next search.
    * If the ****key  ****is larger than the middle element, then the ****right  ****side is used for next search.
  * This process is continued until the ****key  ****is found or the total search space is exhausted.



## How does Binary Search Algorithm work?

To understand the working of binary search, consider the following illustration:

Consider an array ****arr[] = {2, 5, 8, 12, 16, 23, 38, 56, 72, 91}**** , and the ****target = 23****.

## Code Implementation

### ****1\. Python Program for Binary Search Using Recursive****

> Create a recursive function and compare the mid of the search space with the key. And based on the result either return the index where the key is found or call the recursive function for the next search space.

Python `
    
    
    # Python 3 program for recursive binary search.
    # Modifications needed for the older Python 2 are found in comments.
    
    # Returns index of x in arr if present, else -1
    def binary_search(arr, low, high, x):
    
        # Check base case
        if high >= low:
    
            mid = (high + low) // 2
    
            # If element is present at the middle itself
            if arr[mid] == x:
                return mid
    
            # If element is smaller than mid, then it can only
            # be present in left subarray
            elif arr[mid] > x:
                return binary_search(arr, low, mid - 1, x)
    
            # Else the element can only be present in right subarray
            else:
                return binary_search(arr, mid + 1, high, x)
    
        else:
            # Element is not present in the array
            return -1
    
    # Test array
    arr = [ 2, 3, 4, 10, 40 ]
    x = 10
    
    # Function call
    result = binary_search(arr, 0, len(arr)-1, x)
    
    if result != -1:
        print("Element is present at index", str(result))
    else:
        print("Element is not present in array")
    

`

  
**Output**
    
    
    Element is present at index 3

****Time Complexity**** : O(log n)

****Auxiliary Space**** : O(logn)     [NOTE: Recursion creates Call Stack]

### ****2\. Python Program for Binary Search Using Iterative****  

> Here we use a while loop to continue the process of comparing the key and splitting the search space in two halves.

Python `
    
    
    # Iterative Binary Search Function
    # It returns index of x in given array arr if present,
    # else returns -1
    def binary_search(arr, x):
        low = 0
        high = len(arr) - 1
        mid = 0
    
        while low <= high:
    
            mid = (high + low) // 2
    
            # If x is greater, ignore left half
            if arr[mid] < x:
                low = mid + 1
    
            # If x is smaller, ignore right half
            elif arr[mid] > x:
                high = mid - 1
    
            # means x is present at mid
            else:
                return mid
    
        # If we reach here, then the element was not present
        return -1
    
    
    # Test array
    arr = [ 2, 3, 4, 10, 40 ]
    x = 10
    
    # Function call
    result = binary_search(arr, x)
    
    if result != -1:
        print("Element is present at index", str(result))
    else:
        print("Element is not present in array")
    

`

  
**Output**
    
    
    Element is present at index 3

****Time Complexity**** : O(log n)

****Auxiliary Space**** : O(1)

### ****3\. Python Program for Binary Search Using the built-in bisect module****

****Step by step approach:****

  * The code imports the bisect module which provides support for binary searching.
  * The binary_search_bisect() function is defined which takes an array arr and the element to search x as inputs.
  * The function calls the bisect_left() function of the bisect module which finds the position of the element in the sorted array arr where x should be inserted to maintain the sorted order. If the element is already present in the array, this function will return its position.
  * The function then checks if the returned index i is within the range of the array and if the element at that index is equal to x.
  * If the condition is true, then the function returns the index i as the position of the element in the array.
  * If the condition is false, then the function returns -1 indicating that the element is not present in the array.
  * The code then defines an array arr and an element x to search.
  * The binary_search_bisect() function is called with arr and x as inputs and the returned result is stored in the result variable.
  * The code then checks if the result is not equal to -1, indicating that the element is present in the array. If true, it prints the position of the element in the array.
  * If the result is equal to -1, then the code prints a message that the element is not present in the array.

Python `
    
    
    import bisect
     
    def binary_search_bisect(arr, x):
        i = bisect.bisect_left(arr, x)
        if i != len(arr) and arr[i] == x:
            return i
        else:
            return -1
     
     
    # Test array
    arr = [2, 3, 4, 10, 40]
    x = 10
     
    # Function call
    result = binary_search_bisect(arr, x)
     
    if result != -1:
        print("Element is present at index", str(result))
    else:
        print("Element is not present in array")
    

`

  
**Output**
    
    
    Element is present at index 3

****Time Complexity**** : O(log n)

****Auxiliary Space**** : O(1)

## Python Program for Binary Search (Recursive and Iterative) - FAQs

### What is Binary Search?

> Binary Search is an efficient algorithm for finding an item from a sorted list or array. It works by repeatedly dividing the search interval in half:
> 
>   * If the value of the search key is less than the item in the middle of the interval, the search continues in the lower half.
>   * If the value is greater, the search continues in the upper half.
>   * The process is repeated until the value is found or the interval is empty.
> 


### Can Binary Search be applied to unsorted lists?

> No, binary search requires the list to be sorted. If the list is not sorted, the algorithm will not work correctly.

### How do you handle duplicate elements in Binary Search?

> Binary search does not handle duplicates explicitly. If duplicates are present, it will find one of the occurrences of the element, but it won't guarantee which one. To find the first or last occurrence of a duplicate, you need to modify the binary search algorithm.

### Can Binary Search be used on other data structures?

> Yes, binary search can be used on other sorted data structures such as binary search trees (BST) and sorted arrays. The principle of halving the search space is applicable to various types of sorted data structures.

  


  


__ Comment 

More info

[Advertise with us](https://www.geeksforgeeks.org/about/contact-us/?listicles)

[ Next Article ](https://www.geeksforgeeks.org/program-print-pattern-g/?ref=next_article)

[Program to print the pattern 'G'](https://www.geeksforgeeks.org/program-print-pattern-g/?ref=next_article)

[![author](https://media.geeksforgeeks.org/auth/profile/sb7ciorr5k5t22woqkes) __ ](https://www.geeksforgeeks.org/user/kartik/contributions/?itm_source=geeksforgeeks&itm_medium=article_author&itm_campaign=auth_user)

[kartik](https://www.geeksforgeeks.org/user/kartik/contributions/?itm_source=geeksforgeeks&itm_medium=article_author&itm_campaign=auth_user)

Follow

[ ![News](https://media.geeksforgeeks.org/auth-dashboard-uploads/Google-news.svg) ](https://news.google.com/publications/CAAqBwgKMLTrzwsw44bnAw?hl=en-IN&gl=IN&ceid=IN%3Aen)

__

Improve __

Article Tags : 

  * [Python Programs](https://www.geeksforgeeks.org/category/programming-language/python/python-programs/?ref=article_category)
  * [python searching-exercises](https://www.geeksforgeeks.org/tag/python-searching-exercises/?ref=article_tag)



### Similar Reads

  * [ Python Programs  Practice with Python program examples is always a good choice to scale up your logical understanding and programming skills and this article will provide you with the best sets of Python code examples. The below Python section contains a wide collection of Python programming examples. These Python c __ 11 min read ](https://www.geeksforgeeks.org/python-programming-examples/?ref=lbp)

## Basic Programs

    * [ How to Add Two Numbers in Python  The task of adding two numbers in Python involves taking two input values and computing their sum using various techniques . For example, if a = 5 and b = 7 then after addition, the result will be 12. Using the "+" Operator+ operator is the simplest and most direct way to add two numbers . It perfor __ 5 min read ](https://www.geeksforgeeks.org/python-program-to-add-two-numbers/?ref=lbp)

* * *

    * [ Find Maximum of two numbers in Python  In this article, we will explore various methods to find maximum of two numbers in Python. The simplest way to find maximum of two numbers in Python is by using built-in max() function. [GFGTABS] Python a = 7 b = 3 print(max(a, b)) [/GFGTABS]Output7 Explanation: max() function compares the two numbe __ 2 min read ](https://www.geeksforgeeks.org/maximum-of-two-numbers-in-python/?ref=lbp)

* * *

    * [ Python Program to Find the Factorial of a Number  Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n in Python. Example Simple Python program to find the factorial of a number [GFGTABS] Python # Input: An integer number num = 6 # Initialize the factorial variable to 1 factorial = 1 # Calculate the fact __ 3 min read ](https://www.geeksforgeeks.org/python-program-for-factorial-of-a-number/?ref=lbp)

* * *

    * [ Python Program for Simple Interest  The task of calculating Simple Interest in Python involves taking inputs for principal amount, time period in years, and rate of interest per annum, applying the Simple Interest formula and displaying the result. For example, if p = 1000, t = 2 (years), and r = 5%, the Simple Interest is calculated __ 3 min read ](https://www.geeksforgeeks.org/python-program-for-simple-interest/?ref=lbp)

* * *

    * [ Python Program for Compound Interest  Let us discuss the formula for compound interest. The formula to calculate compound interest annually is given by: A = P(1 + R/100) t Compound Interest = A - P Where, A is amount P is the principal amount R is the rate and T is the time spanFind Compound Interest with Python C/C++ Code # Python3 pro __ 3 min read ](https://www.geeksforgeeks.org/python-program-for-compound-interest/?ref=lbp)

* * *

    * [ Python Program to Check Armstrong Number  Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number of order n (order is number of digits) if. abcd... = pow(a,n) + pow(b,n) + pow(c,n) + pow(d,n) + .... Example: Input : 153 Output : Yes 153 is an Armstrong nu __ 6 min read ](https://www.geeksforgeeks.org/python-program-to-check-armstrong-number/?ref=lbp)

* * *

## Array Programs

    * [ Python Program to Find Sum of Array  Given an array of integers, find the sum of its elements. Examples: Input : arr[] = {1, 2, 3}Output : 6Explanation: 1 + 2 + 3 = 6This Python program calculates the sum of an array by iterating through each element and adding it to a running total. The sum is then returned. An example usage is provid __ 4 min read ](https://www.geeksforgeeks.org/python-program-to-find-sum-of-array/?ref=lbp)

* * *

    * [ Python Program to Find Largest Element in an Array  To find the largest element in an array, iterate over each element and compare it with the current largest element. If an element is greater, update the largest element. At the end of the iteration, the largest element will be found. Given an array, find the largest element in it. Input : arr[] = {1 __ 4 min read ](https://www.geeksforgeeks.org/python-program-to-find-largest-element-in-an-array/?ref=lbp)

* * *

    * [ Python Program for Array Rotation  Here we are going to see how we can rotate array with Python code. Array Rotation: Python Program for Array Rotation ExamplePartitioning the sub arrays and reversing them Approach: Input arr[] = [1, 2, 3, 4, 5, 6, 7, 8], d = 1, size = 8 1) Reverse the entire list by swapping first and last numbers i __ 7 min read ](https://www.geeksforgeeks.org/python-program-for-program-for-array-rotation-2/?ref=lbp)

* * *

    * [ Python Program for Reversal algorithm for array rotation  Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements. In this article, we will explore the Reversal Algorithm for array rotation and implement it in Python. Example Input: arr[] = [1, 2, 3, 4, 5, 6, 7] d = 2 Output: arr[] = [3, 4, 5, 6, 7, 1, 2] Rotation of the above array __ 2 min read ](https://www.geeksforgeeks.org/python-program-for-reversal-algorithm-for-array-rotation/?ref=lbp)

* * *

    * [ Python Program to Split the array and add the first part to the end  There is a given array and split it from a specified position, and move the first part of the array add to the end. Examples: Input : arr[] = {12, 10, 5, 6, 52, 36} k = 2 Output : arr[] = {5, 6, 52, 36, 12, 10} Explanation : Split from index 2 and first part {12, 10} add to the end .Input : arr[] = __ 5 min read ](https://www.geeksforgeeks.org/python-program-for-split-the-array-and-add-the-first-part-to-the-end/?ref=lbp)

* * *

    * [ Python Program for Find remainder of array multiplication divided by n  Write a Python program for a given multiple numbers and a number n, the task is to print the remainder after multiplying all the numbers divided by n. Examples: Input: arr[] = {100, 10, 5, 25, 35, 14}, n = 11Output: 9Explanation: 100 x 10 x 5 x 25 x 35 x 14 = 61250000 % 11 = 9Input : arr[] = {100, 1 __ 3 min read ](https://www.geeksforgeeks.org/python-program-for-find-reminder-of-array-multiplication-divided-by-n/?ref=lbp)

* * *

    * [ Python Program to check if given array is Monotonic  Given an array A containing n integers. The task is to check whether the array is Monotonic or not. An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i <= j, A[i] <= A[j]. An array A is monotone decreasing if for all __ 7 min read ](https://www.geeksforgeeks.org/python-program-to-check-if-given-array-is-monotonic/?ref=lbp)

* * *

## List Programs

    * [ Python program to interchange first and last elements in a list  Given a list, write a Python program to swap the first and last element of the list using Python. Examples: The last element of the list can be referred to as a list[-1]. Therefore, we can simply swap list[0] with list[-1]. [GFGTABS] Python # Initialize a list my_list = [1, 2, 3, 4, 5] # Interchange __ 5 min read ](https://www.geeksforgeeks.org/python-program-to-interchange-first-and-last-elements-in-a-list/?ref=lbp)

* * *

    * [ Python Program to Swap Two Elements in a List  In this article, we will explore various methods to swap two elements in a list in Python. The simplest way to do is by using multiple assignment. Example: [GFGTABS] Python a = [10, 20, 30, 40, 50] # Swapping elements at index 0 and 4 # using multiple assignment a[0], a[4] = a[4], a[0] print(a) [/GF __ 2 min read ](https://www.geeksforgeeks.org/python-program-to-swap-two-elements-in-a-list/?ref=lbp)

* * *

    * [ How To Find the Length of a List in Python  The length of a list refers to the number of elements in the list. There are several methods to determine the length of a list in Python. In this article, we'll explore different methods to find the length of a list. The simplest and most common way to do this is by using the len() function. Let's t __ 3 min read ](https://www.geeksforgeeks.org/python-ways-to-find-length-of-list/?ref=lbp)

* * *

    * [ Check if element exists in list in Python  In this article, we will explore various methods to check if element exists in list in Python. The simplest way to check for the presence of an element in a list is using the in Keyword. Example: [GFGTABS] Python a = [10, 20, 30, 40, 50] # Check if 30 exists in the list if 30 in a: print("Eleme __ 3 min read ](https://www.geeksforgeeks.org/check-if-element-exists-in-list-in-python/?ref=lbp)

* * *

    * [ Different ways to clear a list in Python  In this article, we will explore various methods to clear a list in Python. The simplest way to do is by using a loop. Using clear() MethodUsing clear() method we can remove all elements from a list. This method modifies the list in place and removes all its elements. [GFGTABS] Python a = [1, 2, 3, __ 2 min read ](https://www.geeksforgeeks.org/different-ways-to-clear-a-list-in-python/?ref=lbp)

* * *

    * [ Reversing a List in Python  In this article, we are going to explore multiple ways to reverse a list. Python provides several methods to reverse a list using built-in functions and manual approaches. The simplest way to reverse a list is by using the reverse() method. Let's take an example to reverse a list using reverse() met __ 4 min read ](https://www.geeksforgeeks.org/python-reversing-list/?ref=lbp)

* * *

## Matrix Programs

    * [ Adding and Subtracting Matrices in Python  In this article, we will discuss how to add and subtract elements of the matrix in Python. Example: Suppose we have two matrices A and B. A = [[1,2],[3,4]] B = [[4,5],[6,7]] then we get A+B = [[5,7],[9,11]] A-B = [[-3,-3],[-3,-3]] Now let us try to implement this using Python 1. Adding elements of t __ 4 min read ](https://www.geeksforgeeks.org/adding-and-subtracting-matrices-in-python/?ref=lbp)

* * *

    * [ Python Program to Add Two Matrices  The task of adding two matrices in Python involves combining corresponding elements from two given matrices to produce a new matrix. Each element in the resulting matrix is obtained by adding the values at the same position in the input matrices. For example, if two 2x2 matrices are given as: The su __ 3 min read ](https://www.geeksforgeeks.org/python-program-add-two-matrices/?ref=lbp)

* * *

    * [ Python Program to Multiply Two Matrices  Given two matrices, we will have to create a program to multiply two matrices in Python. Example: Python Matrix Multiplication of Two-Dimension [GFGTABS] Python matrix_a = [[1, 2], [3, 4]] matrix_b = [[5, 6], [7, 8]] result = [[0, 0], [0, 0]] for i in range(2): for j in range(2): result[i][j] = (mat __ 5 min read ](https://www.geeksforgeeks.org/python-program-multiply-two-matrices/?ref=lbp)

* * *

    * [ Matrix Product - Python  The task of calculating the matrix product in Python involves finding the product of all elements within a matrix or 2D list . This operation requires iterating through each element in the matrix and multiplying them together to obtain a single cumulative product. For example, given a matrix a = [[1 __ 3 min read ](https://www.geeksforgeeks.org/python-matrix-product/?ref=lbp)

* * *

    * [ Transpose a matrix in Single line in Python  Transpose of a matrix is a task we all can perform very easily in Python (Using a nested loop). But there are some interesting ways to do the same in a single line. In Python, we can implement a matrix as a nested list (a list inside a list). Each element is treated as a row of the matrix. For examp __ 4 min read ](https://www.geeksforgeeks.org/transpose-matrix-single-line-python/?ref=lbp)

* * *

    * [ Python - Matrix creation of n*n  Matrices are fundamental structures in programming and are widely used in various domains including mathematics, machine learning, image processing, and simulations. Creating an nÃn matrix efficiently is an important step for these applications. This article will explore multiple ways to create such __ 3 min read ](https://www.geeksforgeeks.org/python-matrix-creation-of-nn/?ref=lbp)

* * *

    * [ Python | Get Kth Column of Matrix  Sometimes, while working with Python Matrix, one can have a problem in which one needs to find the Kth column of Matrix. This is a very popular problem in Machine Learning Domain and having solution to this is useful. Let's discuss certain ways in which this problem can be solved. Method #1 : Using __ 6 min read ](https://www.geeksforgeeks.org/python-get-kth-column-of-matrix/?ref=lbp)

* * *

    * [ Python - Vertical Concatenation in Matrix  Given a String Matrix, perform column-wise concatenation of strings, handling variable lists lengths. Input : [["Gfg", "good"], ["is", "for"]] Output : ['Gfgis', 'goodfor'] Explanation : Column wise concatenated Strings, "Gfg" concatenated with "is", and so on. Input : [["Gfg", "good", "geeks"], ["i __ 3 min read ](https://www.geeksforgeeks.org/python-vertical-concatenation-in-matrix/?ref=lbp)

* * *

## String Programs

    * [ Python Program to Check if a String is Palindrome or Not  The task of checking if a string is a palindrome in Python involves determining whether a string reads the same forward as it does backward. For example, the string "madam" is a palindrome because it is identical when reversed, whereas "hello" is not. Using two pointer techniqueThis approach involve __ 3 min read ](https://www.geeksforgeeks.org/python-program-check-string-palindrome-not/?ref=lbp)

* * *

    * [ Python program to check whether the string is Symmetrical or Palindrome  The task of checking whether a string is symmetrical or palindrome in Python involves two main operations . A string is symmetrical if its first half matches the second half, considering the middle character for odd-length strings. A string is palindrome if it reads the same forward and backward. Fo __ 4 min read ](https://www.geeksforgeeks.org/python-program-to-check-whether-the-string-is-symmetrical-or-palindrome/?ref=lbp)

* * *

    * [ Reverse Words in a Given String in Python  In this article, we explore various ways to reverse the words in a string using Python. From simple built-in methods to advanced techniques like recursion and stacks. We are going to see various techniques to reverse a string. Using split() and join()Using split() and join() is the most common metho __ 2 min read ](https://www.geeksforgeeks.org/reverse-words-given-string-python/?ref=lbp)

* * *

    * [ How to Remove Letters From a String in Python  Removing letters or specific characters from a string in Python can be done in several ways. But Python strings are immutable, so removal operations cannot be performed in-place. Instead, they require creating a new string, which uses additional memory. Letas start with a simple method to remove a s __ 3 min read ](https://www.geeksforgeeks.org/ways-to-remove-ith-character-from-string-in-python/?ref=lbp)

* * *

    * [ Check if String Contains Substring in Python  This article will cover how to check if a Python string contains another string or a substring in Python. Given two strings, check whether a substring is in the given string. Input: Substring = "geeks" String="geeks for geeks"Output: yesInput: Substring = "geek" String="geeks for geeks"Output: yesEx __ 8 min read ](https://www.geeksforgeeks.org/check-if-string-contains-substring-in-python/?ref=lbp)

* * *

    * [ Python - Words Frequency in String Shorthands  Word frequency in String Shirthands in Python typically refers to calculating how often words appear in a given string using various concise and efficient methods. Using collections.CounterUsing collections.Counter allows you to count the frequency of each character in a string. By leveraging this, __ 3 min read ](https://www.geeksforgeeks.org/python-words-frequency-in-string-shorthands/?ref=lbp)

* * *

## Dictionary Programs

    * [ Python - Ways to remove a key from dictionary  We are given a dictionary and our task is to remove a specific key from it. For example, if we have the dictionary d = {"a": 1, "b": 2, "c": 3}, then after removing the key "b", the output will be {'a': 1, 'c': 3}. Using pop()pop() method removes a specific key from the dictionary and returns its co __ 3 min read ](https://www.geeksforgeeks.org/python-ways-to-remove-a-key-from-dictionary/?ref=lbp)

* * *

    * [ Merging or Concatenating two Dictionaries in Python  Combining two dictionaries is a common task when working with Python, especially when we need to consolidate data from multiple sources or update existing records. For example, we may have one dictionary containing user information and another with additional details and we'd like to merge them into __ 2 min read ](https://www.geeksforgeeks.org/python-merging-two-dictionaries/?ref=lbp)

* * *

    * [ Python - Convert key-values list to flat dictionary  We are given a list that contains tuples with the pairs of key and values we need to convert that list into a flat dictionary. For example a = [("name", "Ak"), ("age", 25), ("city", "NYC")] is a list we need to convert it to dictionary so that output should be a flat dictionary {'name': 'Ak', 'age': __ 3 min read ](https://www.geeksforgeeks.org/python-convert-key-values-list-to-flat-dictionary/?ref=lbp)

* * *

    * [ Python - Insertion at the beginning in OrderedDict  Given an ordered dict, write a program to insert items in the beginning of the ordered dict. Examples: Input: original_dict = {'a':1, 'b':2} item to be inserted ('c', 3) Output: {'c':3, 'a':1, 'b':2}Input: original_dict = {'akshat':1, 'manjeet':2} item to be inserted ('nikhil', 3) Output: {'nikhil': __ 2 min read ](https://www.geeksforgeeks.org/python-insertion-at-the-beginning-in-ordereddict/?ref=lbp)

* * *

    * [ Python | Check order of character in string using OrderedDict( )  Given an input string and a pattern, check if characters in the input string follows the same order as determined by characters present in the pattern. Assume there wonat be any duplicate characters in the pattern. Examples: Input: string = "engineers rock"pattern = "er";Output: trueExplanation: All __ 3 min read ](https://www.geeksforgeeks.org/using-ordereddict-python-check-order-characters-string/?ref=lbp)

* * *

    * [ Python dictionary with keys having multiple inputs  Prerequisite: Python-Dictionary. How to create a dictionary where a key is formed using inputs? Let us consider an example where have an equation for three input variables, x, y, and z. We want to store values of equation for different input triplets. Example 1: C/C++ Code # Python code to demonstra __ 4 min read ](https://www.geeksforgeeks.org/python-dictionary-with-keys-having-multiple-inputs/?ref=lbp)

* * *

## Tuple Programs

    * [ Find the Size of a Tuple in Python  There are several ways to find the "size" of a tuple, depending on whether we are interested in the number of elements or the memory size it occupies. For Example: if we have a tuple like tup = (10, 20, 30, 40, 50), calling len(tup) will return 5, since there are five elements in the tuple. Using le __ 3 min read ](https://www.geeksforgeeks.org/find-the-size-of-a-tuple-in-python/?ref=lbp)

* * *

    * [ Python - Maximum and Minimum K elements in Tuple  Sometimes, while dealing with tuples, we can have problem in which we need to extract only extreme K elements, i.e maximum and minimum K elements in Tuple. This problem can have applications across domains such as web development and Data Science. Let's discuss certain ways in which this problem can __ 8 min read ](https://www.geeksforgeeks.org/python-maximum-and-minimum-k-elements-in-tuple/?ref=lbp)

* * *

    * [ Create a List of Tuples with Numbers and Their Cubes - Python  We are given a list of numbers and our task is to create a list of tuples where each tuple contains a number and its cube. For example, if the input is [1, 2, 3], the output should be [(1, 1), (2, 8), (3, 27)]. Using List ComprehensionList comprehension is one of the most efficient ways to achieve t __ 3 min read ](https://www.geeksforgeeks.org/python-program-to-create-a-list-of-tuples-from-given-list-having-number-and-its-cube-in-each-tuple/?ref=lbp)

* * *

    * [ Python - Adding Tuple to List and Vice - Versa  Adding a tuple to a list in Python can involve appending the entire tuple as a single element or merging its elements into the list. Conversely, adding a list to a tuple requires converting the list to a tuple and concatenating it with the existing tuple, as tuples are immutable. For example, adding __ 4 min read ](https://www.geeksforgeeks.org/python-adding-tuple-to-list-and-vice-versa/?ref=lbp)

* * *

    * [ Python - Closest Pair to Kth index element in Tuple  In the given problem, condition K specifies the maximum allowable difference between corresponding elements of tuples, i.e., it represents the proximity threshold for finding the nearest tuple. The goal is to find the tuple in the list whose elements have the smallest maximum difference compared to __ 7 min read ](https://www.geeksforgeeks.org/python-closest-pair-to-kth-index-element-in-tuple/?ref=lbp)

* * *

    * [ Python - Join Tuples if similar initial element  Sometimes, while working with Python tuples, we can have a problem in which we need to perform concatenation of records from the similarity of initial element. This problem can have applications in data domains such as Data Science. Let's discuss certain ways in which this task can be performed. Inp __ 8 min read ](https://www.geeksforgeeks.org/python-join-tuples-if-similar-initial-element/?ref=lbp)

* * *

## Searching and Sorting Programs

    * [ Linear Search - Python  Given an array, arr of n elements, and an element x, find whether element x is present in the array. Return the index of the first occurrence of x in the array, or -1 if it doesnat exist. Examples: Input: arr[] = [10, 50, 30, 70, 80, 20, 90, 40], x = 30Output : 2Explanation: For array [10, 50, 30, 7 __ 4 min read ](https://www.geeksforgeeks.org/python-program-for-linear-search/?ref=lbp)

* * *

    * [ Bubble Sort - Python  Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order. Bubble Sort algorithm, sorts an array by repeatedly comparing adjacent elements and swapping them if they are in the wrong order. The algorithm iterates through the a __ 2 min read ](https://www.geeksforgeeks.org/python-program-for-bubble-sort/?ref=lbp)

* * *

    * [ Selection Sort - Python  Selection Sort is a comparison-based sorting algorithm. It sorts an array by repeatedly selecting the smallest (or largest) element from the unsorted portion and swapping it with the first unsorted element. This process continues until the entire array is sorted. First we find the smallest element a __ 2 min read ](https://www.geeksforgeeks.org/python-program-for-selection-sort/?ref=lbp)

* * *

    * [ Insertion Sort - Python  Insertion sort is a simple sorting algorithm that works by iteratively inserting each element of an unsorted list into its correct position in a sorted portion of the list. The insertionSort function takes an array arr as input. It first calculates the length of the array (n). If the length is 0 or __ 3 min read ](https://www.geeksforgeeks.org/python-program-for-insertion-sort/?ref=lbp)

* * *

    * [ Python Program for Recursive Insertion Sort  Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands. Python Program for Recursive Insertion Sort for Iterative algorithm for insertion sortAlgorithm // Sort an arr[] of size ninsertionSort(arr, n) Loop from i = 1 to n-1. a) Pick element arr[i] and inser __ 4 min read ](https://www.geeksforgeeks.org/python-program-for-recursive-insertion-sort/?ref=lbp)

* * *

    * [ Binary Search (Recursive and Iterative) - Python  Binary Search Algorithm is a searching algorithm used in a sorted array by repeatedly dividing the search interval in half. The idea of binary search is to use the information that the array is sorted and reduce the time complexity to O(log N). Below is the step-by-step algorithm for Binary Search: __ 6 min read ](https://www.geeksforgeeks.org/python-program-for-binary-search/?ref=lbp)

* * *

## Pattern Printing Programs

    * [ Program to print the pattern 'G'  In this article, we will learn how to print the pattern G using stars and white-spaces. Given a number n, we will write a program to print the pattern G over n lines or rows.Examples: Input : 7 Output : *** * * * *** * * * * *** Input : 9 Output : ***** * * * * *** * * * * * * ***** In this program, __ 6 min read ](https://www.geeksforgeeks.org/program-print-pattern-g/?ref=lbp)

* * *

    * [ Python | Print an Inverted Star Pattern  An inverted star pattern involves printing a series of lines, each consisting of stars (*) that are arranged in a decreasing order. Here we are going to print inverted star patterns of desired sizes in Python Examples: 1) Below is the inverted star pattern of size n=5 (Because there are 5 horizontal __ 2 min read ](https://www.geeksforgeeks.org/python-print-inverted-star-pattern/?ref=lbp)

* * *

    * [ Python 3 | Program to print double sided stair-case pattern  Below mentioned is the Python 3 program to print the double-sided staircase pattern. Examples: Input: 10Output: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Note: This code only works for even values of n. Example1 The given __ 3 min read ](https://www.geeksforgeeks.org/python-3-program-print-double-sided-stair-case-pattern/?ref=lbp)

* * *

    * [ Print with your own font using Python !!  Programming's core function is printing text, but have you ever wished to give it a unique look by utilizing your own custom fonts? Python enables you to use imagination and overcome the standard fonts in your text outputs. In this article, we will do some cool Python tricks. For the user input, the __ 4 min read ](https://www.geeksforgeeks.org/print-font-using-python/?ref=lbp)

* * *




__ Like

__

[![three90RightbarBannerImg](https://media.geeksforgeeks.org/auth-dashboard-uploads/premium_oin_rbar_min.png)](https://www.geeksforgeeks.org/geeksforgeeks-premium-subscription?itm_source=geeksforgeeks&itm_medium=rightbar_oin&itm_campaign=premium)

[ ![geeksforgeeks-footer-logo](https://media.geeksforgeeks.org/auth-dashboard-uploads/gfgFooterLogo.png) ](https://www.geeksforgeeks.org/)

__

Corporate & Communications Address:

A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305) 

__

Registered Address:

K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305 

[ ](https://www.facebook.com/geeksforgeeks.org/) [ ](https://www.instagram.com/geeks_for_geeks/) [ ](https://in.linkedin.com/company/geeksforgeeks) [ ](https://twitter.com/geeksforgeeks) [ ](https://www.youtube.com/geeksforgeeksvideos)

[![GFG App on Play Store](https://media.geeksforgeeks.org/auth-dashboard-uploads/googleplay.png)](https://geeksforgeeksapp.page.link/gfg-app) [![GFG App on App Store](https://media.geeksforgeeks.org/auth-dashboard-uploads/appstore.png)](https://geeksforgeeksapp.page.link/gfg-app)

[Advertise with us](https://www.geeksforgeeks.org/advertise-with-us/?ref=footer)

  * Company
  * [About Us](https://www.geeksforgeeks.org/about/?ref=outindfooter)
  * [Legal](https://www.geeksforgeeks.org/legal/?ref=outindfooter)
  * [Privacy Policy](https://www.geeksforgeeks.org/legal/privacy-policy/?ref=outindfooter)
  * [In Media](https://www.geeksforgeeks.org/press-release/?ref=outindfooter)
  * [Contact Us](https://www.geeksforgeeks.org/about/contact-us/?ref=outindfooter)
  * [Advertise with us](https://www.geeksforgeeks.org/advertise-with-us/?ref=outindfooter)
  * [GFG Corporate Solution](https://www.geeksforgeeks.org/gfg-corporate-solution/?ref=outindfooter)
  * [Placement Training Program](https://www.geeksforgeeks.org/campus-training-program/?ref=outindfooter)
  * [GeeksforGeeks Community](https://www.geeksforgeeks.org/community/?ref=outindfooter)


  * [Languages](https://www.geeksforgeeks.org/introduction-to-programming-languages/?ref=outindfooter)
  * [Python](https://www.geeksforgeeks.org/python-programming-language/?ref=outindfooter)
  * [Java](https://www.geeksforgeeks.org/java/?ref=outindfooter)
  * [C++](https://www.geeksforgeeks.org/c-plus-plus/?ref=outindfooter)
  * [PHP](https://www.geeksforgeeks.org/php-tutorials/?ref=outindfooter)
  * [GoLang](https://www.geeksforgeeks.org/golang/?ref=outindfooter)
  * [SQL](https://www.geeksforgeeks.org/sql-tutorial/?ref=outindfooter)
  * [R Language](https://www.geeksforgeeks.org/r-tutorial/?ref=outindfooter)
  * [Android Tutorial](https://www.geeksforgeeks.org/android-tutorial/?ref=outindfooter)
  * [Tutorials Archive](https://www.geeksforgeeks.org/geeksforgeeks-online-tutorials-free/?ref=outindfooter)


  * [DSA](https://www.geeksforgeeks.org/learn-data-structures-and-algorithms-dsa-tutorial/?ref=outindfooter)
  * [Data Structures](https://www.geeksforgeeks.org/data-structures/?ref=outindfooter)
  * [Algorithms](https://www.geeksforgeeks.org/fundamentals-of-algorithms/?ref=outindfooter)
  * [DSA for Beginners](https://www.geeksforgeeks.org/complete-guide-to-dsa-for-beginners/?ref=outindfooter)
  * [Basic DSA Problems](https://www.geeksforgeeks.org/basic-coding-problems-in-dsa-for-beginners/?ref=outindfooter)
  * [DSA Roadmap](https://www.geeksforgeeks.org/complete-roadmap-to-learn-dsa-from-scratch/?ref=outindfooter)
  * [Top 100 DSA Interview Problems](https://www.geeksforgeeks.org/top-100-data-structure-and-algorithms-dsa-interview-questions-topic-wise/?ref=outindfooter)
  * [DSA Roadmap by Sandeep Jain](https://www.geeksforgeeks.org/dsa-roadmap-for-beginner-to-advanced-by-sandeep-jain/?ref=outindfooter)
  * [All Cheat Sheets](https://www.geeksforgeeks.org/geeksforgeeks-master-sheet-list-of-all-cheat-sheets/?ref=outindfooter)


  * [Data Science & ML](https://www.geeksforgeeks.org/ai-ml-ds/?ref=outindfooter)
  * [Data Science With Python](https://www.geeksforgeeks.org/data-science-tutorial/?ref=outindfooter)
  * [Data Science For Beginner](https://www.geeksforgeeks.org/data-science-for-beginners/?ref=outindfooter)
  * [Machine Learning](https://www.geeksforgeeks.org/machine-learning/?ref=outindfooter)
  * [ML Maths](https://www.geeksforgeeks.org/machine-learning-mathematics/?ref=outindfooter)
  * [Data Visualisation](https://www.geeksforgeeks.org/python-data-visualization-tutorial/?ref=outindfooter)
  * [Pandas](https://www.geeksforgeeks.org/pandas-tutorial/?ref=outindfooter)
  * [NumPy](https://www.geeksforgeeks.org/numpy-tutorial/?ref=outindfooter)
  * [NLP](https://www.geeksforgeeks.org/natural-language-processing-nlp-tutorial/?ref=outindfooter)
  * [Deep Learning](https://www.geeksforgeeks.org/deep-learning-tutorial/?ref=outindfooter)


  * [Web Technologies](https://www.geeksforgeeks.org/web-technology/?ref=outindfooter)
  * [HTML](https://www.geeksforgeeks.org/html/?ref=outindfooter)
  * [CSS](https://www.geeksforgeeks.org/css/?ref=outindfooter)
  * [JavaScript](https://www.geeksforgeeks.org/javascript/?ref=outindfooter)
  * [TypeScript](https://www.geeksforgeeks.org/typescript/?ref=outindfooter)
  * [ReactJS](https://www.geeksforgeeks.org/learn-reactjs/?ref=outindfooter)
  * [NextJS](https://www.geeksforgeeks.org/nextjs/?ref=outindfooter)
  * [Bootstrap](https://www.geeksforgeeks.org/bootstrap/?ref=outindfooter)
  * [Web Design](https://www.geeksforgeeks.org/web-design/?ref=outindfooter)


  * [Python Tutorial](https://www.geeksforgeeks.org/python-programming-language/?ref=outindfooter)
  * [Python Programming Examples](https://www.geeksforgeeks.org/python-programming-examples/?ref=outindfooter)
  * [Python Projects](https://www.geeksforgeeks.org/python-projects-beginner-to-advanced/?ref=outindfooter)
  * [Python Tkinter](https://www.geeksforgeeks.org/python-tkinter-tutorial/?ref=outindfooter)
  * [Web Scraping](https://www.geeksforgeeks.org/python-web-scraping-tutorial/?ref=outindfooter)
  * [OpenCV Tutorial](https://www.geeksforgeeks.org/opencv-python-tutorial/?ref=outindfooter)
  * [Python Interview Question](https://www.geeksforgeeks.org/python-interview-questions/?ref=outindfooter)
  * [Django](https://www.geeksforgeeks.org/django-tutorial/?ref=outindfooter)



  * Computer Science
  * [Operating Systems](https://www.geeksforgeeks.org/operating-systems/?ref=outindfooter)
  * [Computer Network](https://www.geeksforgeeks.org/computer-network-tutorials/?ref=outindfooter)
  * [Database Management System](https://www.geeksforgeeks.org/dbms/?ref=outindfooter)
  * [Software Engineering](https://www.geeksforgeeks.org/software-engineering/?ref=outindfooter)
  * [Digital Logic Design](https://www.geeksforgeeks.org/digital-electronics-logic-design-tutorials/?ref=outindfooter)
  * [Engineering Maths](https://www.geeksforgeeks.org/engineering-mathematics-tutorials/?ref=outindfooter)
  * [Software Development](https://www.geeksforgeeks.org/software-development/?ref=outindfooter)
  * [Software Testing](https://www.geeksforgeeks.org/software-testing-tutorial/?ref=outindfooter)


  * [DevOps](https://www.geeksforgeeks.org/devops-tutorial/?ref=outindfooter)
  * [Git](https://www.geeksforgeeks.org/git-tutorial/?ref=outindfooter)
  * [Linux](https://www.geeksforgeeks.org/linux-tutorial/?ref=outindfooter)
  * [AWS](https://www.geeksforgeeks.org/aws-tutorial/?ref=outindfooter)
  * [Docker](https://www.geeksforgeeks.org/docker-tutorial/?ref=outindfooter)
  * [Kubernetes](https://www.geeksforgeeks.org/kubernetes-tutorial/?ref=outindfooter)
  * [Azure](https://www.geeksforgeeks.org/microsoft-azure/?ref=outindfooter)
  * [GCP](https://www.geeksforgeeks.org/google-cloud-platform-tutorial/?ref=outindfooter)
  * [DevOps Roadmap](https://www.geeksforgeeks.org/devops-roadmap/?ref=outindfooter)


  * [System Design](https://www.geeksforgeeks.org/system-design-tutorial/?ref=outindfooter)
  * [High Level Design](https://www.geeksforgeeks.org/what-is-high-level-design-learn-system-design/?ref=outindfooter)
  * [Low Level Design](https://www.geeksforgeeks.org/what-is-low-level-design-or-lld-learn-system-design/?ref=outindfooter)
  * [UML Diagrams](https://www.geeksforgeeks.org/unified-modeling-language-uml-introduction/?ref=outindfooter)
  * [Interview Guide](https://www.geeksforgeeks.org/system-design-interview-guide/?ref=outindfooter)
  * [Design Patterns](https://www.geeksforgeeks.org/software-design-patterns/?ref=outindfooter)
  * [OOAD](https://www.geeksforgeeks.org/object-oriented-analysis-and-design/?ref=outindfooter)
  * [System Design Bootcamp](https://www.geeksforgeeks.org/system-design-interview-bootcamp-guide/?ref=outindfooter)
  * [Interview Questions](https://www.geeksforgeeks.org/most-commonly-asked-system-design-interview-problems-questions/?ref=outindfooter)


  * [Inteview Preparation](https://www.geeksforgeeks.org/technical-interview-preparation/?ref=outindfooter)
  * [Competitive Programming](https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/?ref=outindfooter)
  * [Top DS or Algo for CP](https://www.geeksforgeeks.org/top-algorithms-and-data-structures-for-competitive-programming/?ref=outindfooter)
  * [Company-Wise Recruitment Process](https://www.geeksforgeeks.org/company-wise-recruitment-process/?ref=outindfooter)
  * [Company-Wise Preparation](https://www.geeksforgeeks.org/company-preparation/?ref=outindfooter)
  * [Aptitude Preparation](https://www.geeksforgeeks.org/aptitude-questions-and-answers/?ref=outindfooter)
  * [Puzzles](https://www.geeksforgeeks.org/puzzles/?ref=outindfooter)


  * School Subjects
  * [Mathematics](https://www.geeksforgeeks.org/maths/?ref=outindfooter)
  * [Physics](https://www.geeksforgeeks.org/physics/?ref=outindfooter)
  * [Chemistry](https://www.geeksforgeeks.org/chemistry/?ref=outindfooter)
  * [Biology](https://www.geeksforgeeks.org/biology/?ref=outindfooter)
  * [Social Science](https://www.geeksforgeeks.org/social-science/?ref=outindfooter)
  * [English Grammar](https://www.geeksforgeeks.org/english-grammar/?ref=outindfooter)
  * [Commerce](https://www.geeksforgeeks.org/commerce/?ref=outindfooter)
  * [World GK](https://www.geeksforgeeks.org/tag/world-general-knowledge/?ref=outindfooter)


  * [GeeksforGeeks Videos](https://www.geeksforgeeks.org/videos/?ref=outindfooter)
  * [DSA](https://www.geeksforgeeks.org/videos/category/sde-sheet/?ref=outindfooter)
  * [Python](https://www.geeksforgeeks.org/videos/category/python/?ref=outindfooter)
  * [Java](https://www.geeksforgeeks.org/videos/category/java-w6y5f4/?ref=outindfooter)
  * [C++](https://www.geeksforgeeks.org/videos/category/c/?ref=outindfooter)
  * [Web Development](https://www.geeksforgeeks.org/videos/category/web-development/?ref=outindfooter)
  * [Data Science](https://www.geeksforgeeks.org/videos/category/data-science/?ref=outindfooter)
  * [CS Subjects](https://www.geeksforgeeks.org/videos/category/cs-subjects/?ref=outindfooter)



[@GeeksforGeeks, Sanchhaya Education Private Limited](https://www.geeksforgeeks.org/), [All rights reserved](https://www.geeksforgeeks.org/copyright-information/)

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our [_Cookie Policy_](https://www.geeksforgeeks.org/cookie-policy/) & [_Privacy Policy_](https://www.geeksforgeeks.org/privacy-policy/) Got It ! 

![Lightbox]()

Improvement

__

Suggest changes

Suggest Changes

Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.

![geeksforgeeks-suggest-icon](https://media.geeksforgeeks.org/auth-dashboard-uploads/suggestChangeIcon.png)

Create Improvement

Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.

![geeksforgeeks-improvement-icon](https://media.geeksforgeeks.org/auth-dashboard-uploads/createImprovementIcon.png)

__

Suggest Changes

__

min 4 words, max Words Limit:1000

## Thank You!

Your suggestions are valuable to us.

## What kind of Experience do you want to share?

[ Interview Experiences ](https://write.geeksforgeeks.org/posts-new?cid=e8fc46fe-75e7-4a4b-be3c-0c862d655ed0) [ Admission Experiences ](https://write.geeksforgeeks.org/posts-new?cid=82536bdb-84e6-4661-87c3-e77c3ac04ede) [ Career Journeys ](https://write.geeksforgeeks.org/posts-new?cid=5219b0b2-7671-40a0-9bda-503e28a61c31) [ Work Experiences ](https://write.geeksforgeeks.org/posts-new?cid=22ae3354-15b6-4dd4-a5b4-5c7a105b8a8f) [ Campus Experiences ](https://write.geeksforgeeks.org/posts-new?cid=c5e1ac90-9490-440a-a5fa-6180c87ab8ae) [ Competitive Exam Experiences ](https://write.geeksforgeeks.org/posts-new?cid=5ebb8fe9-b980-4891-af07-f2d62a9735f2)


url: https://www.datacamp.com/tutorial/binary-search-python
title: Binary Search in Python: A Guide for Efficient Searching | DataCamp
scrape_date: 2025-03-14T14:02:22.665203
content_type: markdown
hash: d516cf8a93bc864a1216ef2eabe7202e1ed94035c35d4023319ed0386983acf3
content:
Skip to main content

[](/)**Write for us**](https://datacamp-1.gitbook.io/community-submissions)

EN

tutorials

Blogs](/blog)

Tutorials](/tutorial)

[docs](/doc)

[Podcasts](/podcast)

[Cheat Sheets](/cheat-sheet)

[code-alongs](/code-along)

Category

Category

Technologies

Discover content by tools and technology

Artificial Intelligence](/tutorial/category/ai)[AWS](/tutorial/category/aws)[Azure](/tutorial/category/microsoft-azure)[Business Intelligence](/tutorial/category/learn-business-intelligence)[ChatGPT](/tutorial/category/chatgpt)[Databricks](/tutorial/category/databricks)[dbt](/tutorial/category/dbt)[Docker](/tutorial/category/docker)[Excel](/tutorial/category/excel)[Generative AI](/tutorial/category/generative-ai)[Git](/tutorial/category/git)[Google Cloud Platform](/tutorial/category/google-cloud-platform)[Hugging Face](/tutorial/category/Hugging-Face)[Java](/tutorial/category/java)[Julia](/tutorial/category/julia)[Kubernetes](/tutorial/category/kubernetes)[Large Language Models](/tutorial/category/large-language-models)[OpenAI](/tutorial/category/OpenAI)[PostgreSQL](/tutorial/category/postgresql)[Power BI](/tutorial/category/power-bi)[Python](/tutorial/category/python)[R](/tutorial/category/r-programming)[Scala](/tutorial/category/scala)[Snowflake](/tutorial/category/snowflake)[Spreadsheets](/tutorial/category/spreadsheets)[SQL](/tutorial/category/sql)[SQLite](/tutorial/category/sqlite)[Tableau](/tutorial/category/tableau)

Category

Topics

Discover content by data science topics

[AI for Business](/tutorial/category/ai-for-business)[Big Data](/tutorial/category/big-data)[Career Services](/tutorial/category/career-services)[Cloud](/tutorial/category/cloud)[Data Analysis](/tutorial/category/data-analysis)[Data Engineering](/tutorial/category/data-engineering)[Data Literacy](/tutorial/category/data-literacy)[Data Science](/tutorial/category/data-science)[Data Visualization](/tutorial/category/data-visualization)[DataLab](/tutorial/category/datalab)[Deep Learning](/tutorial/category/deep-learning)[Machine Learning](/tutorial/category/machine-learning)[MLOps](/tutorial/category/mlops)[Natural Language Processing](/tutorial/category/natural-language-processing)

[Request a Demo](/business)[](/search-resources)

category

  1. [Home](https://www.datacamp.com)
  2. [Tutorials](https://www.datacamp.com/tutorial)
  3. [Python](https://www.datacamp.com/tutorial/category/python)



# Binary Search in Python: A Complete Guide for Efficient Searching

Learn how to implement binary search in Python using iterative and recursive approaches, and explore the built-in bisect module for efficient, pre-implemented binary search functions.

List

Aug 23, 2024 · 12 min read

Imagine you're playing a guessing game where you have to find a specific number between 1 and 100. You could try guessing randomly, but in the worst-case scenario, you may need 100 guesses to get to the correct answer.

A shorter method might be to pick the number in the middle, 50, and ask whether the target number is higher or lower. If your target number is higher, you can ignore everything below 50, and repeat this task with the numbers 51-100. You can continue until you find the correct number.

By halving the possibilities each time, you zero in on the target quickly. With this method, even in the worst-case scenario, it would only take at most 7 guesses to find the correct number. This strategy is the essence of binary search.

In this guide, we'll dive into what binary search is, its practical applications, and how to implement it in Python using both iterative and recursive methods. For a full-featured course, explore our [Data Structures and Algorithms in Python](https://www.datacamp.com/courses/data-structures-and-algorithms-in-python) course which explores binary search in detail, alongside other common and important searching algorithms like linear search, depth first search, and breadth first search.

## What is Binary Search?

When searching for a value in a dataset, your goal is to find its index, or location, so you can easily retrieve and use that value in your code. Several search algorithms can help you locate the index of a specific value. One of the most efficient and fundamental methods is binary search.  

## Build Machine Learning Skills

Elevate your machine learning skills to production level.

Start Learning for Free](https://www.datacamp.com/tracks/machine-learning-in-production)

To speak generally, an algorithm is a precise sequence of instructions that a computer follows to accomplish a specific task or solve a problem. Check out our blog post, [What is an Algorithm](https://www.datacamp.com/blog/what-is-an-algorithm), to learn about the many different kinds of algorithms in machine learning.

### Concept overview

Binary search is a powerful algorithm designed to efficiently find a value in a sorted dataset. The core idea behind binary search is straightforward: Instead of checking each element in the dataset one by one, like in a linear search, binary search narrows down the search range by half with each step, making the process much faster.

Here’s how it works:

  1. Begin by comparing the target value with the middle element of the dataset. The index for the middle value is calculated using the formula: _middle = (low + high) / 2,_ where low is the index of the first element in the current search range, and high is the index of the last element.
  2. Compare the middle value with the target. If the target value is equal to the middle element, you've found the index, and the search is complete. If the target value is smaller than the middle element, the search continues in the left half of the dataset. If the target value is larger, the search continues in the right half of the dataset.
  3. Repeat steps 1-2. The search range is continually halved at each step. Repeat the process until the target value is found or the search range becomes empty.



![Example of using binary search on an array with 9 values.](https://media.datacamp.com/cms/google/ad_4nxcmoya_ikt2jtbaeaarbckbcmqfdbeiftcahzjbub8iwz6vbylms5wmr_vqdn7njkqwuye3uxdctr7s5d20xcg0rux9xsjvdzdrvj9qesj2iqzwp7u9nkyzvfa9pk-au6d1aukdjmu6yncapkrn0p6y-du.png)

_The binary search process. Image by Author  
  
_

Above is a simplified example demonstrating the concept behind binary search.

This halving process is what makes binary search so efficient. However, it’s important to note that the dataset must be sorted for binary search to work correctly. If the data isn’t sorted, the algorithm will not function as intended. 

Check out [Data Structures: A Comprehensive Guide With Python Examples](https://www.datacamp.com/tutorial/data-structures-guide-python) to learn more about different types of data structures you may want to search.

### Key points to remember

The following points highlight the core principles of binary search.

#### Efficiency

Binary search is significantly faster than linear search, particularly when dealing with large datasets. While linear search has a time complexity of _O(n)_ , meaning it may have to check every single element in the worst case, binary search is more efficient. It has a time complexity of _O(log n)_ , meaning the search space is halved with each step, significantly reducing the number of comparisons needed.

For a detailed breakdown of how algorithms are evaluated, refer to our [Big O Notation and Time Complexity Guide: Intuition and Math](https://www.datacamp.com/tutorial/big-o-notation-time-complexity). An option is our [Analyzing Complexity of Code through Python](https://www.datacamp.com/tutorial/analyzing-complexity-code-python) tutorial.

#### Requirements

For binary search to work, the dataset must be sorted in either ascending or descending order. This is a requirement because the algorithm relies on the order of elements to determine which half of the dataset to search next. If the data isn’t sorted, binary search cannot accurately locate the target value.

#### Flexibility

Binary search can be implemented using either an iterative or recursive approach. The iterative method uses loops to repeatedly halve the search range. The recursive method involves the function calling itself with a smaller search range. This flexibility lends itself well to different applications.

## Real-World Applications

Binary search is a powerful tool. Its efficiency in narrowing down search ranges quickly makes it invaluable, particularly when dealing with large datasets where performance and speed are critical. Let's explore some specific applications and see how binary search stacks up against other algorithms.

### Databases

In databases, binary search is often used to quickly locate records within sorted fields, such as finding a specific user in a database sorted by user ID. Imagine a database containing millions of records. A linear search would require scanning each record one by one, which could take considerable time. Instead, binary search can swiftly pinpoint the desired record by systematically halving the search space, significantly reducing the number of comparisons needed.

### Data science

Searching through large, sorted datasets is a common task in data science. For instance, in time series analysis, binary search can be used to find specific timestamps within a sorted sequence of events. In machine learning, binary search algorithms can be used to optimize hyperparameters by finding the best value within a range.

### Computer graphics

In computer graphics, binary search is used in algorithms where precision and speed are needed. One example is in ray tracing, a rendering technique used to simulate how light interacts with objects. Binary search can be used to quickly find intersection points between rays and surfaces.

### Building blocks for complex algorithms

Binary search is not just useful on its own; it also serves as a building block for more complex algorithms and data structures. For example, search trees, such as binary search trees (BSTs), and balanced trees, like AVL trees, are based on the principles of binary search. These structures allow for efficient searching, insertion, and deletion operations, making them useful when data needs to be dynamically updated and searched frequently. Learn more about these trees in [AVL Tree: Complete Guide With Python Implementation](https://www.datacamp.com/tutorial/avl-tree).

## Binary Search Vs. Other Search Algorithms

Let’s explore how binary search compares to two other common search algorithms: linear search and hash lookup.

### Linear search

Linear search is a straightforward algorithm that examines each element in a dataset sequentially. It is significantly less efficient than binary search, with a time complexity of _O(n)_. However, linear search doesn’t require the data to be sorted, making it useful in some scenarios.

### Hash lookup

Hash lookup is an efficient algorithm used for quickly finding values in a dataset when those values are associated with unique keys. It works by applying a hash function to the key, which computes an index where the corresponding value is stored in a hash table. This allows for near-instantaneous retrieval of values, often in _O(1)_ time. However, while hash lookup is very fast for finding specific elements, it requires additional memory to store the hash table and is not suited for searching within a range of values, a task where binary search is more appropriate.

## Implementing Binary Search in Python

Let’s explore a few ways of implementing a simple binary search in Python. But first, we need to establish a simple dataset to work with and a target value to search for. Imagine we have the following sorted array and search target:
    
    
    arr = [2, 5, 8, 12, 16, 23, 38, 56, 72, 91]
    target = 56

### Iterative method

The iterative method is perhaps the most straightforward approach. Using this method, we use a while loop to repeatedly divide the search interval in half until we find our target. This method is often favored for its clarity and efficiency.

Here’s how you can implement binary search iteratively:
    
    
    def binary_search_iterative(arr, target):
        # Define the search bounds
        left, right = 0, len(arr) - 1  
        while left <= right:
            # Calculate the middle index
            mid = left + (right - left) // 2  
            # If the middle element is the target, return its index
            if arr[mid] == target:
                return mid  
            # If the target is bigger, narrow the search to the right half
            elif arr[mid] < target: 
                left = mid + 1  
            # If the target is smaller, narrow the search to the left half
            else: 
                right = mid - 1  
        # Return -1 if the target is not found
        return -1 
        
    # Run the iterative function
    result = binary_search_iterative(arr, target)
    if result != -1:
        print(f"Iterative: Target found at index {result}")
    else:
        print("Iterative: Target not found")

Let’s take a closer look at this code:

  * We start by setting ‘left’ and ‘right’ as the bounds of the search space. Initially, left is `0` (the beginning of the array), and ‘right’ is `len(arr) - 1` (the end of the array).

  * In each iteration, we calculate the mid index, which represents the middle of the current search interval. This is done using the formula `mid = left + (right - left) /2`.

  * We then compare the element at `mid` with `target`:

    * If they match, we’ve found our target, and the function returns `mid`.

    * If the element at `mid` is less than the target, it means the target must be in the right half, so we adjust `left` to `mid + 1`.

    * If the element at `mid` is greater than the target, the target must be in the left half, so we adjust `right` to `mid - 1`.

  * The loop continues until the target is found or until `left` exceeds `right`, which means the target isn’t in the array.




### Recursive method

The recursive method for binary search is another way to implement this algorithm. Instead of using a loop, the function calls itself, adjusting the search bounds each time until it finds the target or determines that the target isn’t present.

Here’s how you can implement binary search recursively:
    
    
    def binary_search_recursive(arr, target, left, right):
        # If the search bounds cross, the target isn't in the array
        if left > right:  
            return -1
        # Calculate the middle index
        mid = left + (right - left) // 2 
        # If middle value equals the target, return the index
        if arr[mid] == target: 
            return mid  
        # If the target is bigger than the middle value, search in the right half
        elif arr[mid] < target: 
            return binary_search_recursive(arr, target, mid + 1, right)  
        # If the target is smaller than the middle value, search in the left half
        else: 
            return binary_search_recursive(arr, target, left, mid - 1)  
    
    # Run the recursive function
    result = binary_search_recursive(arr, target, 0, len(arr) - 1)
    
    if result != -1:
        print(f"Iterative: Target found at index {result}")
    else:
        print("Iterative: Target not found")

Let’s take a closer look at this code:

  * The recursive function starts with the same initial `left` and `right` bounds as the iterative function.

  * It first checks if `left` exceeds `right`. If so, the function returns `-1`, indicating that the target isn’t in the array.

  * Otherwise, the function calculates the `mid` index and compares the target with the element at `mid`.

    * If the target equals the element at `mid`, the function returns `mid`.

    * If the target is greater than `mid`, the function recursively calls itself with updated bounds to search the right half.

    * If the target is less than `mid`, the function searches the left half.

  * The recursion continues until it finds the target or exhausts the search space.




For more on recursive functions, check out[ Understanding Recursive Functions in Python](https://www.datacamp.com/tutorial/understanding-recursive-functions-python).

### Using Python’s built-in bisect module

Python’s standard library includes the `bisect` module, which provides pre-implemented binary search functions. This module is highly efficient and can often save us time over building our own function.

Here’s how we can use the `bisect` module to find the target in our array:
    
    
    # Import the bisect module
    import bisect 
    
    # Call the module and provide the array and the target value
    index = bisect.bisect_left(arr, target) 
    
    #Print results
    if index < len(arr) and arr[index] == target:
        print(f"Bisect: Target found at index {index}")
    else:
        print("Bisect: Target not found")

Let’s take a closer look at this code:

  * The `bisect_left` function returns the index where the target should be inserted to maintain the order of the array. If the target is found at this index, it means the target exists in the array.

  * This method is particularly useful when working with sorted arrays and can also be used to insert elements while maintaining the sorted order.

  * The `bisect` module also provides other functions like `bisect_right` and `insort`, which can be used for finding insertion points or inserting elements directly.




## Become an ML Scientist 

Upskill in Python to become a machine learning scientist.

[Start Learning for Free](https://www.datacamp.com/tracks/machine-learning-scientist-with-python)

## Time and Space Complexity

When discussing the efficiency of an algorithm, we often use Big O notation, represented as _O(x)_ , to describe how the runtime or space requirements grow as the size of the input increases. For binary search, the time complexity is typically _O(log n)_. This means that as the dataset grows, the number of operations needed to find the target increases logarithmically, making binary search efficient even for large datasets.

The iterative method of binary search has a time complexity of _O(log n)_ because the search interval is halved with each iteration. Its space complexity is _O(1)_ since it uses a constant amount of extra space, only requiring a few variables to track the search bounds and the middle element.

The recursive method also has a time complexity of _O(log n)_ for the same reason. However, its space complexity is _O(log n)_ due to the space needed to maintain the call stack for each recursive call. As each recursive call adds a layer to the stack, the depth of recursion is proportional to the number of halving steps, which is logarithmic in relation to the size of the dataset.

While both methods are efficient in terms of time, the iterative approach is more space-efficient. This is why the `bisect` module uses an iterative approach under the hood. Personally, I prefer the iterative approach for this reason as well. However, the recursive approach can be more intuitive for some people and may require fewer lines of code.

## Common Pitfalls and How to Avoid Them

When using a binary search, there are a few common pitfalls to watch out for. These can impact the correctness and efficiency of your algorithm, so it’s important to take note of them.

Firstly, binary search relies on the dataset being sorted. If the data is not sorted, binary search will not function correctly; it might return incorrect results or fail altogether. Therefore, it’s essential to sort our dataset before applying binary search. If sorting the data is not feasible, a binary search is not the appropriate tool.

A frequent issue is off-by-one errors. These errors occur when the index calculations are slightly incorrect, potentially leading to infinite loops or failing to locate the target value. This can happen if the midpoint calculation or the boundary adjustments are not handled precisely. To avoid this, ensure that the calculations for the middle index are correct and that the bounds are updated properly after each comparison. Remember, index values in Python start at 0, not 1.

Another challenge to be aware of if you use binary search recursively is recursion depth issues. In Python, there is a limit to the number of recursive calls that can be made, to prevent excessive memory use. If your dataset is very large, deep recursion might exceed this limit, causing a stack overflow. To mitigate this, consider using an iterative approach for binary search, which does not suffer from recursion depth limitations. If recursion is preferred or necessary, you may be able to increase the recursion limit using `sys.setrecursionlimit()`, but this should be done with caution to avoid other potential issues.

## Conclusion

Binary search is a powerful and efficient algorithm that should be in every Python developer’s toolkit. Whether implemented iteratively or recursively, it offers a significant performance advantage over linear search, especially with large datasets. For more, check out [DataCamp’s Python Programming](https://www.datacamp.com/tracks/python-programming) skill track or[ Software Engineering Principles in Python](https://www.datacamp.com/courses/software-engineering-principles-in-python) interactive course.

* * *

![Amberle McKee's photo](https://media.datacamp.com/legacy/v1686323883/Amberle_Mc_Kee_6eeb507e3d.jpg?w=128)

Author

[Amberle McKee](/portfolio/dramberlemckee)

LinkedIn](https://www.linkedin.com/in/amberle-mckee)

I am a PhD with 13 years of experience working with data in a biological research environment. I create software in several programming languages including Python, MATLAB, and R. I am passionate about sharing my love of learning with the world.

## Binary Search FAQs

### What are the common real-world scenarios where binary search might be inefficient?

When data isn't sorted or frequently updated, sorting can slow things down, making binary search less efficient.

### Can binary search be used on data structures other than arrays, such as linked lists?

No, because accessing the middle of a linked list takes linear time, negating binary search's speed.

### How does binary search handle duplicate values in a dataset?

Binary search finds one occurrence. To find all duplicates, additional searches for the bounds are needed.

### What is the advantage of using the bisect module in Python over writing a custom binary search function?

The `bisect` module is optimized, reliable, and has added features like insertion while keeping the dataset sorted.

### How can binary search be applied in non-numeric datasets, such as searching through sorted text or strings?

Binary search works for sorted text by comparing items based on lexicographical order.

 

Topics

Python](/tutorial/category/python)[Data Science](/tutorial/category/data-science)

* * *

![Amberle McKee's photo](https://media.datacamp.com/legacy/v1686323883/Amberle_Mc_Kee_6eeb507e3d.jpg?w=128)

[Amberle McKee](/portfolio/dramberlemckee)A PhD with 13 years of experience working with data in a biological research environment.

* * *

Topics

[Python](/tutorial/category/python)[Data Science](/tutorial/category/data-science)

How to Sort a Dictionary by Value in Python](/tutorial/sort-a-dictionary-by-value-python)

### [Python Tutorial for Beginners](/tutorial/python)

### [How to Write Memory-Efficient Classes in Python](/tutorial/write-memory-efficient-classes-in-python)

### [Understanding Recursive Functions in Python](/tutorial/understanding-recursive-functions-python)

### [AVL Tree: Complete Guide With Python Implementation](/tutorial/avl-tree)

### [Sorting in Python Tutorial](/tutorial/sorting-in-python)

Learn Python with DataCamp

course

### [Generalized Linear Models in Python](/courses/generalized-linear-models-in-python)

5 hr

9.5K

Extend your regression toolbox with the logistic and Poisson models and learn to train, understand, and validate them, as well as to make predictions.

See DetailsRight Arrow](/courses/generalized-linear-models-in-python)[Start Course](/users/sign_up?redirect=%2Fcourses%2Fgeneralized-linear-models-in-python%2Fcontinue)

course

### [Recurrent Neural Networks (RNNs) for Language Modeling with Keras](/courses/recurrent-neural-networks-rnn-for-language-modeling-with-keras)

4 hr

14K

Learn how to use RNNs to classify text sentiment, generate sentences, and translate text between languages.

[See DetailsRight Arrow](/courses/recurrent-neural-networks-rnn-for-language-modeling-with-keras)[Start Course](/users/sign_up?redirect=%2Fcourses%2Frecurrent-neural-networks-rnn-for-language-modeling-with-keras%2Fcontinue)

course

### [Introduction to Deep Learning with Keras](/courses/introduction-to-deep-learning-with-keras)

4 hr

38K

Learn to start developing deep learning models with Keras.

[See DetailsRight Arrow](/courses/introduction-to-deep-learning-with-keras)[Start Course](/users/sign_up?redirect=%2Fcourses%2Fintroduction-to-deep-learning-with-keras%2Fcontinue)

See MoreRight Arrow](https://www.datacamp.com/category/python)

Related

tutorialHow to Sort a Dictionary by Value in Python](/tutorial/sort-a-dictionary-by-value-python)

Learn efficient methods to sort a dictionary by values in Python. Discover ascending and descending order sorting and bonus tips for key sorting.

[![Neetika Khandelwal's photo](https://media.datacamp.com/legacy/v1718877198/Screenshot_20240524_112530_Gallery_8191b5a93c.jpg?w=48)](/portfolio/neetikakhandelwal6)

Neetika Khandelwal

5 min

[tutorialPython Tutorial for Beginners](/tutorial/python)

Get a step-by-step guide on how to install Python and use it for basic data science functions.

[![Matthew Przybyla's photo](https://media.datacamp.com/legacy/v1662144771/Matthew_Przybyla_011b7ad542.jpg?w=48)](/portfolio/mprzybyla123)

Matthew Przybyla

12 min

[tutorialHow to Write Memory-Efficient Classes in Python](/tutorial/write-memory-efficient-classes-in-python)

Learn about memory management in Python with advanced techniques for coding memory-efficient classes. Explore practical exercises for optimal performance.

[![Arunn Thevapalan's photo](https://media.datacamp.com/legacy/v1674838483/Arunn_Thevapalan_compressed_fbae237540.png?w=48)](/portfolio/ArunnThevapalan)

Arunn Thevapalan

30 min

[tutorialUnderstanding Recursive Functions in Python](/tutorial/understanding-recursive-functions-python)

In this tutorial, learn about the different aspects of recursive functions and implement a recursive function in Python from scratch. 

[![Sayak Paul's photo](https://media.datacamp.com/legacy/v1679912413/sayak_paul_b983a06bc8.jpg?w=48)](/portfolio/spsayakpaul)

Sayak Paul

12 min

[tutorialAVL Tree: Complete Guide With Python Implementation](/tutorial/avl-tree)

An AVL tree is a self-balancing binary search tree where the height difference between the left and right subtrees of any node is at most one, ensuring efficient operations.

![François Aubry's photo](https://media.datacamp.com/legacy/v1725454842/IMG_20231023_WA_0003_db9e8a0738.jpg?w=48)

François Aubry

18 min

[tutorialSorting in Python Tutorial](/tutorial/sorting-in-python)

Discover what the sort method is and how to do it.

![DataCamp Team's photo](https://media.datacamp.com/legacy/v1657881099/DC_logo_new_56cef25cde.png?w=48)

DataCamp Team

1 min

[See More](/tutorial/category/python)[See More](/tutorial/category/python)

## Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.

**Learn**

[Learn Python](/blog/how-to-learn-python-expert-guide)[Learn AI](/blog/how-to-learn-ai)[Learn Power BI](/learn/power-bi)[Learn Data Engineering](/category/data-engineering)[Assessments](/signal)[Career Tracks](/tracks/career)[Skill Tracks](/tracks/skill)[Courses](/courses-all)[Data Science Roadmap](/blog/data-science-roadmap)

**Data Courses**

[Python Courses](/category/python)[R Courses](/category/r)[SQL Courses](/category/sql)[Power BI Courses](/category/power-bi)[Tableau Courses](/category/tableau)[Alteryx Courses](/category/alteryx)[Azure Courses](/category/azure)[AWS Courses](/category/aws)[Google Sheets Courses](/category/google-sheets)[Excel Courses](/category/excel)[AI Courses](/category/artificial-intelligence)[Data Analysis Courses](/category/data-analysis)[Data Visualization Courses](/category/data-visualization)[Machine Learning Courses](/category/machine-learning)[Data Engineering Courses](/category/data-engineering)[Probability & Statistics Courses](/category/probability-and-statistics)

**DataLab**

[Get Started](/datalab)[Pricing](/datalab/pricing)[Security](/datalab/security)[Documentation](https://datalab-docs.datacamp.com)

**Certification**

[Certifications](/certification)[Data Scientist](/certification/data-scientist)[Data Analyst](/certification/data-analyst)[Data Engineer](/certification/data-engineer)[SQL Associate](/certification/sql-associate)[Power BI Data Analyst](/certification/data-analyst-in-power-bi)[Tableau Certified Data Analyst](/certification/data-analyst-in-tableau)[Azure Fundamentals](/certification/azure-fundamentals)[AI Fundamentals](/certification/ai-fundamentals)

**Resources**

[Resource Center](/resources)[Upcoming Events](/webinars)[Blog](/blog)[Code-Alongs](/code-along)[Tutorials](/tutorial)[Docs](/doc)[Open Source](/open-source)[RDocumentation](https://www.rdocumentation.org)[Book a Demo with DataCamp for Business](/business/demo)[Data Portfolio](/data-portfolio)

**Plans**

[Pricing](/pricing)[For Students](/pricing/student)[For Business](/business)[For Universities](/universities)[Discounts, Promos & Sales](/promo)[DataCamp Donates](/donates)

**For Business**

[Business Pricing](/business/compare-plans)[Teams Plan](/business/learn-teams)[Data & AI Unlimited Plan](/business/data-unlimited)[Customer Stories](/business/customer-stories)[Partner Program](/business/partner-program)

**About**

[About Us](/about)[Learner Stories](/stories)[Careers](/careers)[Become an Instructor](/learn/create)[Press](/press)[Leadership](/about/leadership)[Contact Us](https://support.datacamp.com/hc/en-us/articles/360021185634)[DataCamp Español](/es)[DataCamp Português](/pt)[DataCamp Deutsch](/de)[DataCamp Français](/fr)

**Support**

[Help Center](https://support.datacamp.com/hc/en-us)[Become an Affiliate](/affiliates)

Facebook](https://www.facebook.com/datacampinc/)Twitter](https://twitter.com/datacamp)LinkedIn](https://www.linkedin.com/school/datacampinc/)YouTube](https://www.youtube.com/channel/UC79Gv3mYp6zKiSwYemEik9A)Instagram](https://www.instagram.com/datacamp/)

[Privacy Policy](/privacy-policy)[Cookie Notice](/cookie-notice)[Do Not Sell My Personal Information](/do-not-sell-my-personal-information)[Accessibility](/accessibility)[Security](/security)[Terms of Use](/terms-of-use)

© 2025 DataCamp, Inc. All Rights Reserved.


url: https://www.freecodecamp.org/news/binary-search-algorithm-and-time-complexity-explained/
title: Binary Search – Algorithm and Time Complexity Explained
scrape_date: 2025-03-14T14:02:22.665652
content_type: markdown
hash: a2e0557a3516577273b0775698c07d8420afe16b5eb0aaa0afcd0efe4444b804
content:
Search  Submit your search query

[![freeCodeCamp.org](https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg)](https://www.freecodecamp.org/news/)

[Forum](https://forum.freecodecamp.org/) [Donate](https://www.freecodecamp.org/donate/)

July 12, 2023  / [ #algorithms ](/news/tag/algorithms/)

# Binary Search – Algorithm and Time Complexity Explained

![Bala Priya C](https://cdn.hashnode.com/res/hashnode/image/upload/v1640182085352/em-AboBL8.jpeg) [ Bala Priya C ](/news/author/balapriyac/)

![Binary Search – Algorithm and Time Complexity Explained](https://www.freecodecamp.org/news/content/images/size/w2000/2023/07/cover-img-search.png)

When working with arrays, you’ll often have to search through them to check if they contain a target element.

You can always run a sequential search—scanning the array from the beginning to the end—on the array. But if the array is sorted, running the binary search algorithm is much more efficient.

Let's learn how binary search works, its time complexity, and code a simple implementation in Python.

## How Does Linear Search Work?

We'll start our discussion with **linear** or **sequential search**.

Suppose we have an unsorted sequence of numbers `nums`. Given this nums array, you should check if the `target` is present in `nums`. You don’t have information about whether `nums` is sorted.

So the only way you can do this is to scan the array in a linear fashion, starting at the first element—until you find a match.

You can loop through the entire array to check if the element at index `i` matches the `target`. Once you find a match, you can break out of the loop.

Notice that in the worst case, you’ll have to scan the entire array and be lucky enough to find a match at the last index. Or you’ll have exhausted the array—without finding a match—indicating that the element is not present in the array. 

Suppose the array has `n` elements. Because you have to scan the entire array—in the worst case—the linear search algorithm has a time complexity of O(n).

Here's an example:

![Image](https://www.freecodecamp.org/news/content/images/2023/07/image-66.png) _Linear Search Example | Image by the author_

But when you do not know anything about the sequence, this is the best you can do. _So linear or sequential search is the best you can do when searching through unsorted sequences._

### How Linear Search Works in Python

The function `linear_search` takes in an array `nums` and a `target` to search for. It then loops through the array sequentially to check if `target` is present in `nums`:
    
    
    def linear_search(nums,target):
      for num in nums:
        if num == target:
          return True
      return False
    

Here are a couple of sample outputs:
    
    
    nums = [14,21,27,30,36,2,5,7,11]
    target = 27
    
    print(linear_search(nums,target))
    # Output: True
    
    target = 100
    print(linear_search(nums,target))
    # Output: False
    

## How Does Binary Search Work?

Now consider the `nums` sequence with `n` elements sorted in ascending order. For any valid index `k`, the following holds `True` for the element `a_k` at index `k`:

> The elements at indices 0, 1, 2, …, (k-1) are all less than or equal to `a_k`. And all elements at indices (k+1) to (n-1) are greater than or equal to `a_k`.

With this information, you no longer need to run a linear scan. You can do it much faster with binary search. 

We’re given a sorted array `nums` and a `target`. Let mid denote the middle-most index of the array and `nums[mid]` denote the element at the middle index. Here’s how the binary search algorithm works:

  * Check if `nums[mid]` is equal to the `target`. If so, we’ve already found a match—in the very first step—and the search terminates.
  * If `nums[mid]` > `target`, you _only_ need to search the _left half_ of the array. Even when you search through the left subarray you can use the same binary search algorithm.
  * If `nums[mid]` < `target`, you can ignore all the elements up to the middle element and _only_ consider the _right half_ of the array.



Notice that we have a recurrence relation here. First, we start by running the binary search algorithm on the array with n elements. If we don't find the target in the very first step, we run binary search on the subarray of size at most n/2 elements.

If we end up with an empty array or an array with one element that is _not_ the `target`, we conclude that the target does not exist in the `nums` array.

![Image](https://www.freecodecamp.org/news/content/images/2023/07/image-65.png) _Binary Search Example | Image by the author_

### How to Implement Binary Search in Python

Here's a recursive implementation of binary search in Python:
    
    
    def binary_search(nums,target,low,high):
      if low > high:
        return False
      else:
        mid = (low + high)//2
        if nums[mid] == target:
          return True
        elif nums[mid] < target:
          return binary_search(nums,target,mid+1,high)
        else:
          return binary_search(nums,target,low,mid-1)
    

With a few sample runs of the `binary_search` function:
    
    
    nums = [2,5,7,11,14,21,27,30,36]
    target = 27
    
    print(binary_search(nums,target,0,len(nums)-1))
    # Output: True
    
    target = 38
    print(binary_search(nums,target,0,len(nums)-1))
    # Output: False
    

## What Is the Time Complexity of Binary Search?

In binary search, we know that the _search space is reduced by half_ at each step and this guides us in computing the time complexity. 

For an array with `n` elements, we check if the middle-most element matches the `target`. If so, we return `True` and terminate the search.

But if the middle element does not match the `target`, we perform binary search on a subarray of size at most `n/2`. In the next step, we have to search through an array of size at most `n/4`. And we continue this recursively until we can make a decision in a constant time (when the subarray is empty). 

At step `k`, we need to search through an array of size at most `n/(2^k)`. And we need to find the smallest such `k` for which we have no subarray to search through.

Mathematically:

![Image](https://www.freecodecamp.org/news/content/images/2023/07/image-68.png)

The time complexity of binary search is, therefore, **O(logn)**. This is much more efficient than the linear time O(n), especially for large values of n.

For example, if the array has 1000 elements. 2^(10) = 1024. While the binary search algorithm will terminate in around 10 steps, linear search will take a thousand steps in the worst case.

## Wrapping Up

And that's a wrap. I hope you found this introduction to binary search helpful! You’ll often run into questions involving binary search in coding interviews. 

If you’re preparing for coding interviews, check out [10 Common Coding Interview Questions [Solved]](https://youtu.be/Peq4GCPNC5c) on freeCodeCamp’s YouTube channel. 

* * *

![Bala Priya C](https://cdn.hashnode.com/res/hashnode/image/upload/v1640182085352/em-AboBL8.jpeg) [ Bala Priya C ](/news/author/balapriyac/)

I'm a self-taught programmer and a technical writer from India. I enjoy reading, writing, and coding. I share my learning with the developer community by writing beginner-friendly programming tutorials. 

* * *

If this article was helpful, share it. 

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. [Get started](https://www.freecodecamp.org/learn/)

ADVERTISEMENT

freeCodeCamp is a donor-supported tax-exempt 501(c)(3) charity organization (United States Federal Tax Identification Number: 82-0779546)

Our mission: to help people learn to code for free. We accomplish this by creating thousands of videos, articles, and interactive coding lessons - all freely available to the public.

Donations to freeCodeCamp go toward our education initiatives, and help pay for servers, services, and staff.

You can [make a tax-deductible donation here](https://www.freecodecamp.org/donate/). 

## Trending Books and Handbooks

  * [Learn CSS Transform ](https://www.freecodecamp.org/news/complete-guide-to-css-transform-functions-and-properties/)
  * [Build a Static Blog ](https://www.freecodecamp.org/news/how-to-create-a-static-blog-with-lume/)
  * [Build an AI Chatbot ](https://www.freecodecamp.org/news/how-to-build-an-ai-chatbot-with-redis-python-and-gpt/)
  * [What is Programming? ](https://www.freecodecamp.org/news/what-is-programming-tutorial-for-beginners/)
  * [Python Code Examples ](https://www.freecodecamp.org/news/python-code-examples-sample-script-coding-tutorial-for-beginners/)
  * [Open Source for Devs ](https://www.freecodecamp.org/news/a-practical-guide-to-start-opensource-contributions/)
  * [HTTP Networking in JS ](https://www.freecodecamp.org/news/http-full-course/)
  * [Write React Unit Tests ](https://www.freecodecamp.org/news/how-to-write-unit-tests-in-react-redux/)
  * [Learn Algorithms in JS ](https://www.freecodecamp.org/news/introduction-to-algorithms-with-javascript-examples/)
  * [How to Write Clean Code ](https://www.freecodecamp.org/news/how-to-write-clean-code/)
  * [Learn PHP ](https://www.freecodecamp.org/news/the-php-handbook/)
  * [Learn Java ](https://www.freecodecamp.org/news/the-java-handbook/)
  * [Learn Swift ](https://www.freecodecamp.org/news/the-swift-handbook/)
  * [Learn Golang ](https://www.freecodecamp.org/news/learn-golang-handbook/)
  * [Learn Node.js ](https://www.freecodecamp.org/news/get-started-with-nodejs/)
  * [Learn CSS Grid ](https://www.freecodecamp.org/news/complete-guide-to-css-grid/)
  * [Learn Solidity ](https://www.freecodecamp.org/news/learn-solidity-handbook/)
  * [Learn Express.js ](https://www.freecodecamp.org/news/the-express-handbook/)
  * [Learn JS Modules ](https://www.freecodecamp.org/news/javascript-es-modules-and-module-bundlers/)
  * [Learn Apache Kafka ](https://www.freecodecamp.org/news/apache-kafka-handbook/)
  * [REST API Best Practices ](https://www.freecodecamp.org/news/rest-api-design-best-practices-build-a-rest-api/)
  * [Front-End JS Development ](https://www.freecodecamp.org/news/front-end-javascript-development-react-angular-vue-compared/)
  * [Learn to Build REST APIs ](https://www.freecodecamp.org/news/build-consume-and-document-a-rest-api/)
  * [Intermediate TS and React ](https://www.freecodecamp.org/news/build-strongly-typed-polymorphic-components-with-react-and-typescript/)
  * [Command Line for Beginners ](https://www.freecodecamp.org/news/command-line-for-beginners/)
  * [Intro to Operating Systems ](https://www.freecodecamp.org/news/an-introduction-to-operating-systems/)
  * [Learn to Build GraphQL APIs ](https://www.freecodecamp.org/news/building-consuming-and-documenting-a-graphql-api/)
  * [OSS Security Best Practices ](https://www.freecodecamp.org/news/oss-security-best-practices/)
  * [Distributed Systems Patterns ](https://www.freecodecamp.org/news/design-patterns-for-distributed-systems/)
  * [Software Architecture Patterns ](https://www.freecodecamp.org/news/an-introduction-to-software-architecture-patterns/)



##  Mobile App 

  * [ ![Download on the App Store](https://cdn.freecodecamp.org/platform/universal/apple-store-badge.svg) ](https://apps.apple.com/us/app/freecodecamp/id6446908151?itsct=apps_box_link&itscg=30200)
  * [ ![Get it on Google Play](https://cdn.freecodecamp.org/platform/universal/google-play-badge.svg) ](https://play.google.com/store/apps/details?id=org.freecodecamp)



## Our Charity

Publication powered by Hashnode  [ About ](https://www.freecodecamp.org/news/about/) [ Alumni Network ](https://www.linkedin.com/school/free-code-camp/people/) [ Open Source ](https://github.com/freeCodeCamp/) [ Shop ](https://www.freecodecamp.org/news/shop/) [ Support ](https://www.freecodecamp.org/news/support/) [ Sponsors ](https://www.freecodecamp.org/news/sponsors/) [ Academic Honesty ](https://www.freecodecamp.org/news/academic-honesty-policy/) [ Code of Conduct ](https://www.freecodecamp.org/news/code-of-conduct/) [ Privacy Policy ](https://www.freecodecamp.org/news/privacy-policy/) [ Terms of Service ](https://www.freecodecamp.org/news/terms-of-service/) [ Copyright Policy ](https://www.freecodecamp.org/news/copyright-policy/)


url: https://www.upgrad.com/tutorials/software-engineering/python-tutorial/binary-search-in-python/
title: Binary Search Algorithm in python Explained in Detail | upGrad
scrape_date: 2025-03-14T14:02:22.665497
content_type: markdown
hash: 60e13fb6f012780529f461c05b8fce56a194d4a78863db51b01f3e3921d59b0e
content:
[![upgrad-logo](https://assets.upgrad.com/1961/_next/static/media/upgrad-header-logo.325f003e.svg)](https://www.upgrad.com)

__

  * For working professionals __

  * For fresh graduates __

  * [Study abroad](https://www.upgrad.com/study-abroad/)
  * More __




[Free Courses](https://www.upgrad.com/free-courses/) Sign Up

[ View All ](https://www.upgrad.com/doctor-of-business-administration-dba-courses/)

[ View All ](https://www.upgrad.com/doctor-of-business-administration-dba-courses/)

  * [Doctorate of Business Administration (DBA) from ESGCI, Paris](https://www.upgrad.com/doctor-of-business-administration-from-esgci/)
  * [Doctor of Business Administration From Golden Gate University](https://www.upgrad.com/dba-from-golden-gate-university/)
  * [Doctor of Business Administration from Rushford Business School, Switzerland](https://www.upgrad.com/dba-from-rushford-business-school/)
  * [Doctorate of Business Administration from Edgewood College](https://www.upgrad.com/doctor-of-business-administration-dba-edgewood-college/)



[ View All ](https://www.upgrad.com/doctor-of-business-administration-dba-courses/)

  * [DBA in Emerging Technologies with Concentration in Generative AI](https://www.upgrad.com/dba-emerging-technologies-specialization-in-gen-ai-ggu/)
  * [DBA in Digital Leadership from Golden Gate University, San Francisco](https://www.upgrad.com/dba-in-digital-leadership-ggu/)



[ View All ](https://www.upgrad.com/machine-learning-course/)

[ View All ](https://www.upgrad.com/machine-learning-course/)

  * [Executive Diploma in Machine Learning and AI](https://www.upgrad.com/machine-learning-ai-pgd-iiitb/)
  * [Master’s Degree in Artificial Intelligence and Data Science](https://www.upgrad.com/masters-of-science-ai-and-data-science-jindal-global-university/)
  * [Master of Science in Machine Learning & AI](https://www.upgrad.com/masters-in-ml-ai-ljmu/)
  * [DBA in Emerging Technologies with Concentration in Generative AI](https://www.upgrad.com/dba-emerging-technologies-specialization-in-gen-ai-ggu/)



[ View All ](https://www.upgrad.com/machine-learning-course/)

  * [Executive Program in Generative AI for Leaders](https://www.upgrad.com/generative-ai-for-business-leaders-iiit-bangalore/)
  * [Post Graduate Certificate in Machine Learning and Deep Learning (Executive)](https://www.upgrad.com/machine-learning-deep-learning-pgc-iiitb/)
  * [Advanced Certificate Program in Generative AI](https://www.upgrad.com/advanced-certificate-program-generative-ai/)
  * [The U & AI GenAI Certificate Program from Microsoft](https://www.upgrad.com/the-u-and-ai-genai-certificate-program-from-microsoft/)
  * [Post Graduate Certificate in Machine Learning & NLP (Executive)](https://www.upgrad.com/machine-learning-nlp-pgc-iiitb/)



  * [](https://www.upgrad.com/machine-learning-course/artificial-intelligence/)
  * [](https://www.upgrad.com/machine-learning-course/tableau/)
  * [](https://www.upgrad.com/machine-learning-course/nlp-natural-language-processing/)
  * [](https://www.upgrad.com/machine-learning-course/deep-learning/)



[ View All ](https://www.upgrad.com/mba-course/)

[ View All ](https://www.upgrad.com/mba-course/)

  * [MBA from Paris School of Business](https://www.upgrad.com/mba-paris-school-of-business/)
  * [Master of Education (M.Ed.) from Edgewood College](https://www.upgrad.com/master-of-education-from-edgewood-college/)
  * [MBA from Golden Gate University, San Francisco](https://www.upgrad.com/mba-from-golden-gate-university/)
  * [MBA by Liverpool Business School (IMT Pathway)](https://www.upgrad.com/mba-liverpool-business-school/)
  * [Post Graduate Diploma in Management (BIMTECH)](https://www.upgrad.com/management-pgdm-bimtech/)
  * [MBA from OP Jindal-Career Acceleration Program](https://www.upgrad.com/op-jindal-career-acceleration-program/)
  * [MBA from O.P.Jindal Global University](https://www.upgrad.com/mba-opj-global-university/)
  * [MBA from Edgewood College](https://www.upgrad.com/mba-from-edgewood-college/)
  * [MBA from UGNXT](https://www.upgrad.com/mba-upgrad-college/)



[ View All ](https://www.upgrad.com/mba-course/)

  * [Advanced General Management Program](https://www.upgrad.com/advanced-general-management-programme-imt-ghaziabad/)



  * [](https://www.upgrad.com/mba-course/mba-in-finance/)
  * [](https://www.upgrad.com/mba-course/mba-in-hr-human-resource-management/)
  * [](https://www.upgrad.com/mba-course/mba-in-marketing/)
  * [](https://www.upgrad.com/mba-course/mba-in-business-analytics/)
  * [](https://www.upgrad.com/mba-course/mba-in-operations-management/)
  * [](https://www.upgrad.com/mba-course/mba-in-international-business/)
  * [](https://www.upgrad.com/mba-course/mba-in-information-technology/)
  * [](https://www.upgrad.com/mba-course/mba-in-general-management/)
  * [](https://www.upgrad.com/mba-course/mba-in-agriculture/)
  * [](https://www.upgrad.com/mba-course/mba-in-supply-chain-management/)
  * [](https://www.upgrad.com/mba-course/mba-in-entrepreneurship/)
  * [](https://www.upgrad.com/mba-course/mba-in-project-management/)
  * [](https://www.upgrad.com/mba-course/mba-in-healthcare-management/)



[ View All ](https://www.upgrad.com/data-science-course/)

[ View All ](https://www.upgrad.com/data-science-course/)

  * [Master’s Degree in Artificial Intelligence and Data Science](https://www.upgrad.com/masters-of-science-ai-and-data-science-jindal-global-university/)
  * [Executive Diploma in Data Science & AI](https://www.upgrad.com/data-science-pgd-iiitb/)
  * [Master of Science in Data Science](https://www.upgrad.com/data-science-masters-degree-ljmu/)



[ View All ](https://www.upgrad.com/data-science-course/)

  * [Post Graduate Certificate in Data Science & AI (Executive)](https://www.upgrad.com/data-science-pgc-iiitb/)
  * [The U & AI GenAI Certificate Program from Microsoft](https://www.upgrad.com/the-u-and-ai-genai-certificate-program-from-microsoft/)



[ View All ](https://www.upgrad.com/bootcamps/)

  * [Data Science Bootcamp with AI](https://www.upgrad.com/bootcamps/job-linked-data-science-advanced-bootcamp/)
  * [Certificate Course in Business Analyitcs & Consulting in association with PwC India](https://www.upgrad.com/business-analytics-certification-pwc-india/)



  * [](https://www.upgrad.com/data-science-course/data-analysis/)
  * [](https://www.upgrad.com/data-science-course/inferential-statistics/)
  * [](https://www.upgrad.com/data-science-course/logistic-regression/)
  * [](https://www.upgrad.com/data-science-course/linear-regression/)
  * [](https://www.upgrad.com/data-science-course/linear-algebra-for-analysis/)
  * [](https://www.upgrad.com/data-science-course/hypothesis-testing/)



[ View All ](https://www.upgrad.com/digital-marketing-courses/)

[ View All ](https://www.upgrad.com/digital-marketing-courses/)

  * [Advanced Certificate in Digital Marketing and Communication](https://www.upgrad.com/digital-marketing-and-communication-pgc-mica/)
  * [The U & AI GenAI Certificate Program from Microsoft](https://www.upgrad.com/the-u-and-ai-genai-certificate-program-from-microsoft/)
  * [Professional Certificate Program in Digital Marketing](https://www.upgrad.com/certification-program-in-digital-marketing-upgradcampus/)



  * [](https://www.upgrad.com/digital-marketing-courses/advertising/)
  * [](https://www.upgrad.com/digital-marketing-courses/influencer-marketing/)
  * [](https://www.upgrad.com/digital-marketing-courses/performance-marketing/)
  * [](https://www.upgrad.com/digital-marketing-courses/sem-search-engine-marketing/)
  * [](https://www.upgrad.com/digital-marketing-courses/email-marketing/)
  * [](https://www.upgrad.com/digital-marketing-courses/content-marketing/)
  * [](https://www.upgrad.com/digital-marketing-courses/social-media-marketing/)
  * [](https://www.upgrad.com/digital-marketing-courses/marketing-analytics/)
  * [](https://www.upgrad.com/digital-marketing-courses/web-analytics/)
  * [](https://www.upgrad.com/digital-marketing-courses/affiliate-marketing/)
  * [](https://www.upgrad.com/digital-marketing-courses/display-advertising/)



[ View All ](https://www.upgrad.com/management-program/)

[ View All ](https://www.upgrad.com/management-program/)

  * [MSc in International Accounting & Finance (ACCA integrated)](https://www.upgrad.com/msc-international-finance-and-accounting-jindal-global-university/)
  * [Master of Design in User Experience](https://www.upgrad.com/master-of-design-in-user-experience-design-jindal-school-of-art-and-architecture-jgu/)



[ View All ](https://www.upgrad.com/management-program/)

  * [Post Graduate Certificate in Product Management from Duke CE](https://www.upgrad.com/product-management/)
  * [Human Resource Analytics Course from IIM-K](https://www.upgrad.com/hrm-analytics-pcp-iimk/)
  * [Global Master Certificate in Integrated Supply Chain Management](https://www.upgrad.com/master-certificate-integrated-supply-chain-management-msu)
  * [The U & AI GenAI Certificate Program from Microsoft](https://www.upgrad.com/the-u-and-ai-genai-certificate-program-from-microsoft/)
  * [CSM® Certification Training](https://www.upgrad.com/agile-management/csm-certification-training/)
  * [CSPO® Certification Training](https://www.upgrad.com/agile-management/cspo-certification-training/)
  * [PMP® Certification Training](https://www.upgrad.com/project-management/pmp-certification-training/)
  * [SAFe® 6.0 Product Owner Product Manager (POPM) Certification](https://www.upgrad.com/agile-management/safe-product-manager-product-owner-training/)



  * [UI/UX Design Bootcamp](https://www.upgrad.com/bootcamps/ui-ux-design-course/)
  * [Certification Program in Financial Modelling and Analysis with PwC Academy](https://upgrad.com/certification-program-in-financial-modelling-and-analysis/)
  * [Certificate Course in Business Analyitcs & Consulting in association with PwC India](https://www.upgrad.com/business-analytics-certification-pwc-india/)



  * [](https://www.upgrad.com/management-program/consumer-behaviour/)
  * [](https://www.upgrad.com/management-program/supply-chain-management/)
  * [](https://www.upgrad.com/management-program/financial-analysis/)
  * [](https://www.upgrad.com/management-program/introduction-to-fintech/)
  * [](https://www.upgrad.com/management-program/hr-analytics/)
  * [](https://www.upgrad.com/management-program/fundamentals-of-communication/)
  * [](https://www.upgrad.com/management-program/art-of-effective-communication/)
  * [](https://www.upgrad.com/management-program/introduction-to-research-methodology/)
  * [](https://www.upgrad.com/management-program/mastering-sales-technique/)
  * [](https://www.upgrad.com/management-program/fundamentals-of-journalism/)
  * [](https://www.upgrad.com/management-program/economics-masterclass/)
  * [](https://www.upgrad.com/management-program/introduction-to-microeconomics/)



[ View All ](https://www.upgrad.com/software-engineering-course/)

[ View All ](https://www.upgrad.com/software-engineering-course/)

  * [Master of Design in User Experience](https://www.upgrad.com/master-of-design-in-user-experience-design-jindal-school-of-art-and-architecture-jgu/)



  * [Post Graduate Certificate in Product Management from Duke CE](https://www.upgrad.com/product-management/)
  * [Professional Certificate Program in Cloud Computing and DevOps](https://www.upgrad.com/professional-certificate-in-cloud-computing-and-devops-program/)
  * [Python Programming Course](https://www.knowledgehut.com/programming/python-programming-certification-training/)
  * [ Executive Post Graduate Programme in Software Dev. - Full Stack]( https://www.upgrad.com/ai-full-stack-development-program-iiit-bangalore/)
  * [AWS Solutions Architect Training](https://www.knowledgehut.com/cloud-computing/aws-solution-architect-certification-training/)
  * [AWS Cloud Practitioner Essentials](https://www.knowledgehut.com/cloud-computing/aws-cloud-practitioner-essentials-certification/)
  * [AWS Technical Essentials](https://www.knowledgehut.com/cloud-computing/aws-technical-essentials-certification-training/)
  * [The U & AI GenAI Certificate Program from Microsoft](https://www.upgrad.com/the-u-and-ai-genai-certificate-program-from-microsoft/)



  * [UI/UX Design Bootcamp](https://www.upgrad.com/bootcamps/ui-ux-design-course/)
  * [Cloud Engineer Bootcamp](https://www.upgrad.com/bootcamps/cloud-engineer-bootcamp/)



  * [](https://www.upgrad.com/software-engineering-course/javascript/)
  * [](https://www.upgrad.com/software-engineering-course/nodejs/)
  * [](https://www.upgrad.com/software-engineering-course/blockchain/)
  * [](https://www.upgrad.com/software-engineering-course/sql/)
  * [](https://www.upgrad.com/software-engineering-course/core-java/)
  * [](https://www.upgrad.com/software-engineering-course/full-stack-development/)
  * [](https://www.upgrad.com/software-engineering-course/big-data/)
  * [](https://www.upgrad.com/software-engineering-course/devops/)
  * [](https://www.upgrad.com/software-engineering-course/data-structures/)
  * [](https://www.upgrad.com/software-engineering-course/nft-non-fungible-tokens/)
  * [](https://www.upgrad.com/software-engineering-course/cyber-security/)
  * [](https://www.upgrad.com/software-engineering-course/react-js/)
  * [](https://www.upgrad.com/software-engineering-course/cloud-computing/)
  * [](https://www.upgrad.com/software-engineering-course/database-design/)
  * [](https://www.upgrad.com/software-engineering-course/python/)
  * [](https://www.upgrad.com/software-engineering-course/cryptocurrency/)



[ View All ](https://www.upgrad.com/llm-course/)

[ View All ](https://www.upgrad.com/llm-course/)

  * [LL.M. in Corporate & Financial Law](https://www.upgrad.com/law-llm-corporate-and-finance-jgu/)
  * [LL.M. in Intellectual Property & Technology Law](https://www.upgrad.com/law-llm-intellectual-property-technology-law-jgls/)
  * [LL.M. in AI and Emerging Technologies](https://www.upgrad.com/llm-in-ai-and-emerging-technologies-op-jindal/)
  * [LL.M. in Dispute Resolution ](https://www.upgrad.com/law-llm-dispute-resolution-jgls/)



[ View All ](https://www.upgrad.com/mba-course/)

  * [Master of Education (M.Ed.) from Edgewood College](https://www.upgrad.com/master-of-education-from-edgewood-college/)



[ View All ](https://www.upgrad.com/machine-learning-course/)

  * [Advanced Certificate Program in GenerativeAI](https://www.upgrad.com/advanced-certificate-program-generative-ai/)



[ View All ](https://www.upgrad.com/data-science-course/)

  * [Data Science Bootcamp with AI](https://www.upgrad.com/bootcamps/job-linked-data-science-advanced-bootcamp/)
  * [Advanced Certificate Program in GenerativeAI](https://www.upgrad.com/advanced-certificate-program-generative-ai/)



[ View All ](https://www.upgrad.com/management-program/)

  * [UI UX Bootcamp](https://www.upgrad.com/bootcamps/ui-ux-design-course/)
  * [Certificate Course in Business Analyitcs & Consulting in association with PwC India](https://www.upgrad.com/business-analytics-certification-pwc-india/)
  * [Certification Program in Financial Modelling and Analysis with PwC Academy](https://www.upgrad.com/certification-program-in-financial-modelling-and-analysis/)



[ View All ](https://www.upgrad.com/software-engineering-course/)

  * [UI/UX Design Bootcamp](https://www.upgrad.com/bootcamps/ui-ux-design-course/)



[ View All ](https://www.upgrad.com/digital-marketing-courses/)

  * [Professional Certificate Program in Digital Marketing](https://www.upgrad.com/certification-program-in-digital-marketing-upgradcampus/)



  * [Cutting-edge insights on education](https://www.upgrad.com/blog/)
  * [Live sessions with industry experts](https://www.upgrad.com/free-masterclass/)
  * [Master skills with expert guidance](https://www.upgrad.com/tutorials/)
  * [Resources for learning and growth](https://www.upgrad.com/learn/)



  * [Your path to educational impact](https://www.upgrad.com/careers/)
  * [Top talent, ready to excel](https://recruit.upgrad.com/)
  * [Scaling enterprises, catalyzing talent](https://www.upgrad-enterprise.com/)
  * [Hands-on learning, near you](https://www.upgrad.com/offline-centres/)
  * [Immersive learning hubs](https://www.upgrad.com/experience-centers/)
  * [Our vision for education](https://www.upgrad.com/about/)



  * [Share knowledge, get rewarded](https://www.upgrad.com/refer-and-earn/)



  *   *   *   *   *   *   *   *   *   *   * 


![icon](https://assets.upgrad.com/1961/_next/static/media/hamburgerMenuIcon.dd64b4a9.svg)

  *   *   *   *   *   *   *   *   *   * 


__

1.[Introduction to Python](/tutorials/software-engineering/python-tutorial/)

 __

2.[Features of Python](/tutorials/software-engineering/python-tutorial/features-of-python/)

 __

3.[How to install python in windows](/tutorials/software-engineering/python-tutorial/how-to-install-python-in-windows/)

 __

4.[How to Install Python on macOS](/tutorials/software-engineering/python-tutorial/how-to-install-python-on-macos/)

 __

5.[Install Python on Linux](/tutorials/software-engineering/python-tutorial/install-python-on-linux/)

 __

6.[Hello World Program in Python ](/tutorials/software-engineering/python-tutorial/hello-world-program-in-python/)

__

7.[Python Variables ](/tutorials/software-engineering/python-tutorial/python-variables/)

__

8.[Global Variable in Python](/tutorials/software-engineering/python-tutorial/global-variable-in-python/)

 __

9.[Python Keywords and Identifiers](/tutorials/software-engineering/python-tutorial/python-keywords-and-identifiers/)

 __

10.[Assert Keyword in Python](/tutorials/software-engineering/python-tutorial/assert-keyword-in-python/)

 __

11.[Comments in Python](/tutorials/software-engineering/python-tutorial/comments-in-python/)

 __

12.[Escape Sequence in Python](/tutorials/software-engineering/python-tutorial/escape-sequence-in-python/)

 __

13.[Print In Python](/tutorials/software-engineering/python-tutorial/print-in-python/)

 __

14.[Python-if-else-statement](/tutorials/software-engineering/python-tutorial/python-if-else-statement/)

 __

15.[Python for Loop](/tutorials/software-engineering/python-tutorial/python-for-loop/)

 __

16.[Nested for loop in Python](/tutorials/software-engineering/python-tutorial/nested-for-loop-in-python/)

 __

17.[While Loop in Python](/tutorials/software-engineering/python-tutorial/while-loop-in-python/)

 __

18.[Python’s do-while Loop](/tutorials/software-engineering/python-tutorial/python-do-while-loop/)

 __

19.[Break in Python](/tutorials/software-engineering/python-tutorial/break-in-python/)

 __

20.[Break Pass and Continue Statement in Python](/tutorials/software-engineering/python-tutorial/break-pass-and-continue-statement-in-python/)

 __

21.[Python Try Except](/tutorials/software-engineering/python-tutorial/python-try-except/)

 __

22.[Data Types in Python](/tutorials/software-engineering/python-tutorial/data-types-in-python/)

 __

23.[Float in Python](/tutorials/software-engineering/python-tutorial/float-in-python/)

 __

24.[String Methods Python ](/tutorials/software-engineering/python-tutorial/string-methods-python/)

__

25.[List in Python](/tutorials/software-engineering/python-tutorial/list-in-python/)

 __

26.[List Methods in Python](/tutorials/software-engineering/python-tutorial/list-methods-in-python/)

 __

27.[Tuples in Python](/tutorials/software-engineering/python-tutorial/tuples-in-python/)

 __

28.[Dictionary in Python](/tutorials/software-engineering/python-tutorial/dictionary-in-python/)

 __

29.[Set in Python](/tutorials/software-engineering/python-tutorial/set-in-python/)

 __

30.[Operators in Python](/tutorials/software-engineering/python-tutorial/operators-in-python/)

 __

31.[Boolean Operators in Python](/tutorials/software-engineering/python-tutorial/boolean-operators-in-python/)

 __

32.[Arithmetic Operators in Python](/tutorials/software-engineering/python-tutorial/arithmetic-operators-in-python/)

 __

33.[Assignment Operator in Python](/tutorials/software-engineering/python-tutorial/assignment-operator-in-python/)

 __

34.[Bitwise operators in Python](/tutorials/software-engineering/python-tutorial/bitwise-operator-in-python/)

 __

35.[Identity Operator in Python](/tutorials/software-engineering/python-tutorial/identity-operator-in-python/)

 __

36.[Operator Precedence in Python](/tutorials/software-engineering/python-tutorial/operator-precedence-in-python/)

 __

37.[Functions in Python](/tutorials/software-engineering/python-tutorial/functions-in-python/)

 __

38.[Lambda and Anonymous Function in Python](/tutorials/software-engineering/python-tutorial/lambda-and-anonymous-function-in-python/)

 __

39.[Range Function in Python](/tutorials/software-engineering/python-tutorial/range-function-in-python/)

 __

40.[len() Function in Python](/tutorials/software-engineering/python-tutorial/len-function-in-python/)

 __

41.[How to Use Lambda Functions in Python?](/tutorials/software-engineering/python-tutorial/how-to-use-lambda-functions-in-python/)

__

42.[Random Function in Python](/tutorials/software-engineering/python-tutorial/random-function-in-python/)

 __

43.[Python __init__() Function](/tutorials/software-engineering/python-tutorial/__init__-in-python/)

 __

44.[String Split function in Python](/tutorials/software-engineering/python-tutorial/string-split-function-in-python/)

 __

45.[Round function in Python](/tutorials/software-engineering/python-tutorial/round-function-in-python/)

 __

46.[Find Function in Python](/tutorials/software-engineering/python-tutorial/find-function-in-python/)

 __

47.[How to Call a Function in Python?](/tutorials/software-engineering/python-tutorial/how-to-call-a-function-in-python/)

__

48.[Python Functions Scope](/tutorials/software-engineering/python-tutorial/python-functions-scope/)

 __

49.[ Method Overloading in Python ](/tutorials/software-engineering/python-tutorial/method-overloading-in-python/)

__

50.[Method Overriding in Python](/tutorials/software-engineering/python-tutorial/method-overriding-in-python/)

 __

51.[Static Method in Python](/tutorials/software-engineering/python-tutorial/staticmethod-in-python/)

 __

52.[Python List Index Method](/tutorials/software-engineering/python-tutorial/python-list-index-method/)

 __

53.[Python Modules](/tutorials/software-engineering/python-tutorial/python-modules/)

 __

54.[Math Module in Python](/tutorials/software-engineering/python-tutorial/math-module-in-python/)

 __

55.[Module and Package in Python](/tutorials/software-engineering/python-tutorial/module-and-package-in-python/)

 __

56.[OS module in Python](/tutorials/software-engineering/python-tutorial/os-module-in-python/)

 __

57.[Python Packages](/tutorials/software-engineering/python-tutorial/python-packages/)

 __

58.[OOPs Concepts in Python](/tutorials/software-engineering/python-tutorial/oops-concepts-in-python/)

 __

59.[Class in Python](/tutorials/software-engineering/python-tutorial/class-in-python/)

 __

60.[Abstract Class in Python](/tutorials/software-engineering/python-tutorial/abstract-class-in-python/)

 __

61.[Object in Python](/tutorials/software-engineering/python-tutorial/object-in-python/)

 __

62.[Constructor in Python ](/tutorials/software-engineering/python-tutorial/constructor-in-python/)

__

63.[Inheritance in Python](/tutorials/software-engineering/python-tutorial/inheritance-in-python/)

 __

64.[Multiple Inheritance in Python](/tutorials/software-engineering/python-tutorial/multiple-inheritance-in-python/)

 __

65.[Encapsulation in Python](/tutorials/software-engineering/python-tutorial/encapsulation-in-python/)

 __

66.[Data Abstraction in Python ](/tutorials/software-engineering/python-tutorial/data-abstraction-in-python/)

__

67.[Opening and closing files in Python](/tutorials/software-engineering/python-tutorial/opening-and-closing-files-in-python/)

 __

68.[ How to open JSON file in Python](/tutorials/software-engineering/python-tutorial/how-to-open-json-file-in-python/)

 __

69.[Read CSV Files in Python](/tutorials/software-engineering/python-tutorial/read-csv-file-in-python/)

 __

70.[How to Read a File in Python](/tutorials/software-engineering/python-tutorial/how-to-read-a-file-in-python/)

 __

71.[How to Open a File in Python? ](/tutorials/software-engineering/python-tutorial/how-to-open-a-file-in-python/)

__

72.[Python Write to File](/tutorials/software-engineering/python-tutorial/python-write-to-file/)

 __

73.[JSON Python](/tutorials/software-engineering/python-tutorial/json-python/)

 __

74.[Python JSON – How to Convert a String to JSON](/tutorials/software-engineering/python-tutorial/how-to-convert-string-to-json-python/)

 __

75.[Python JSON Encoding and Decoding](/tutorials/software-engineering/python-tutorial/python-json-encoding-and-decoding/)

 __

76.[Exception Handling in Python](/tutorials/software-engineering/python-tutorial/exception-handling-in-python/)

 __

77.[Recursion in Python](/tutorials/software-engineering/python-tutorial/recursion-in-python/)

 __

78.[Python Decorators](/tutorials/software-engineering/python-tutorial/python-decorators/)

 __

79.[Python Threading](/tutorials/software-engineering/python-tutorial/python-threading/)

 __

80.[Multithreading in Python](/tutorials/software-engineering/python-tutorial/multithreading-in-python/)

 __

81.[Multiprocеssing in Python](/tutorials/software-engineering/python-tutorial/multiprocessing-in-python/)

 __

82.[Python Regular Expressions](/tutorials/software-engineering/python-tutorial/python-regular-expressions/)

 __

83.[Enumerate() in Python](/tutorials/software-engineering/python-tutorial/enumerate-in-python/)

 __

84.[Map in Python](/tutorials/software-engineering/python-tutorial/map-in-python/)

 __

85.[Filter in Python](/tutorials/software-engineering/python-tutorial/filter-in-python/)

 __

86.[Eval in Python](/tutorials/software-engineering/python-tutorial/eval-in-python/)

 __

87.[Difference Between List, Tuple, Set, and Dictionary in Python](/tutorials/software-engineering/python-tutorial/difference-between-list-tuple-set-and-dictionary-in-python/)

 __

88.[List to String in Python](/tutorials/software-engineering/python-tutorial/list-to-string-in-python/)

 __

89.[Linked List in Python](/tutorials/software-engineering/python-tutorial/linked-list-in-python/)

 __

90.[Length of list in Python](/tutorials/software-engineering/python-tutorial/length-of-list-in-python/)

 __

91.[Python List remove() Method](/tutorials/software-engineering/python-tutorial/Python-list--remove/)

 __

92.[How to Add Elements in a List in Python ](/tutorials/software-engineering/python-tutorial/how-to-add-elements-in-list-in-python/)

__

93.[How to Reverse a List in Python?](/tutorials/software-engineering/python-tutorial/how-to-reverse-a-list-in-python/)

__

94.[Difference Between List and Tuple in Python](/tutorials/software-engineering/python-tutorial/difference-between-list-and-tuple-in-python/)

 __

95.[List Slicing in Python](/tutorials/software-engineering/python-tutorial/list-slicing-in-python/)

 __

96.[Sort in Python](/tutorials/software-engineering/python-tutorial/sort-in-python/)

 __

97.[Merge Sort in Python](/tutorials/software-engineering/python-tutorial/merge-sort-in-python/)

 __

98.[Selection Sort in Python](/tutorials/software-engineering/python-tutorial/selection-sort-in-python/)

 __

99.[Sort Array in Python](/tutorials/software-engineering/python-tutorial/sort-array-in-python/)

 __

100.[Sort Dictionary by Value in Python](/tutorials/software-engineering/python-tutorial/sort-dictionary-by-value-in-python/)

 __

101.[Datetime Python](/tutorials/software-engineering/python-tutorial/datetime-python/)

 __

102.[Random Number in Python](/tutorials/software-engineering/python-tutorial/random-number-in-python/)

 __

103.[2D Array in Python](/tutorials/software-engineering/python-tutorial/2d-array-in-python/)

 __

104.[Abs in Python](/tutorials/software-engineering/python-tutorial/abs-in-python/)

 __

105.[Advantages of Python](/tutorials/software-engineering/python-tutorial/advantages-of-python/)

 __

106.[Anagram Program in Python](/tutorials/software-engineering/python-tutorial/anagram-program-in-python/)

 __

107.[Append in Python](/tutorials/software-engineering/python-tutorial/append-in-python/)

 __

108.[Applications of Python](/tutorials/software-engineering/python-tutorial/applications-of-python/)

 __

109.[Armstrong Number in Python](/tutorials/software-engineering/python-tutorial/armstrong-number-in-python/)

 __

110.[Assert in Python](/tutorials/software-engineering/python-tutorial/assert-in-python/)

 __

111.[Binary Search in Python ](/tutorials/software-engineering/python-tutorial/binary-search-in-python/)

__

112.[Binary to Decimal in Python](/tutorials/software-engineering/python-tutorial/binary-to-decimal-in-python/)

 __

113.[Bool in Python](/tutorials/software-engineering/python-tutorial/bool-in-python/)

 __

114.[Calculator Program in Python](/tutorials/software-engineering/python-tutorial/calculator-program-in-python/)

 __

115.[chr in Python](/tutorials/software-engineering/python-tutorial/chr-in-python/)

 __

116.[Control Flow Statements in Python](/tutorials/software-engineering/python-tutorial/control-flow-statements-in-python/)

 __

117.[Convert String to Datetime Python](/tutorials/software-engineering/python-tutorial/convert-string-to-datetime-python/)

 __

118.[Count in python](/tutorials/software-engineering/python-tutorial/count-in-python/)

 __

119.[ Counter in Python](/tutorials/software-engineering/python-tutorial/counter-in-python/)

 __

120.[Data Visualization in Python](/tutorials/software-engineering/python-tutorial/data-visualization-in-python/)

 __

121.[Datetime in Python](/tutorials/software-engineering/python-tutorial/datetime-in-python/)

 __

122.[Extend in Python](/tutorials/software-engineering/python-tutorial/extend-in-python/)

 __

123.[F-string in Python](/tutorials/software-engineering/python-tutorial/f-string-in-python/)

 __

124.[Fibonacci Series in Python ](/tutorials/software-engineering/python-tutorial/fibonacci-series-in-python/)

__

125.[Format in Python](/tutorials/software-engineering/python-tutorial/format-in-python/)

 __

126.[GCD of Two Numbers in Python](/tutorials/software-engineering/python-tutorial/gcd-of-two-numbers-in-python/)

 __

127.[How to Become a Python Developer](/tutorials/software-engineering/python-tutorial/how-to-become-python-developer/)

 __

128.[How to Run Python Program](/tutorials/software-engineering/python-tutorial/how-to-run-python-program/)

 __

129.[In Which Year Was the Python Language Developed?](/tutorials/software-engineering/python-tutorial/in-which-year-was-the-python-language-developed/)

__

130.[Indentation in Python](/tutorials/software-engineering/python-tutorial/indentation-in-python/)

 __

131.[Index in Python](/tutorials/software-engineering/python-tutorial/index-in-python/)

 __

132.[Interface in Python](/tutorials/software-engineering/python-tutorial/interface-in-python/)

 __

133.[Is Python Case Sensitive?](/tutorials/software-engineering/python-tutorial/is-python-case-sensitive/)

__

134.[Isalpha in Python](/tutorials/software-engineering/python-tutorial/isalpha-in-python/)

 __

135.[Isinstance() in Python](/tutorials/software-engineering/python-tutorial/isinstance-in-python/)

 __

136.[Iterator in Python](/tutorials/software-engineering/python-tutorial/iterator-in-python/)

 __

137.[Join in Python ](/tutorials/software-engineering/python-tutorial/join-in-python/)

__

138.[Leap Year Program in Python](/tutorials/software-engineering/python-tutorial/leap-year-program-in-python/)

 __

139.[ Lexicographical Order in Python](/tutorials/software-engineering/python-tutorial/lexicographical-order-in-python/)

 __

140.[ Literals in Python](/tutorials/software-engineering/python-tutorial/literals-in-python/)

 __

141.[Matplotlib](/tutorials/software-engineering/python-tutorial/matplotlib/)

 __

142.[Matrix Multiplication in Python](/tutorials/software-engineering/python-tutorial/matrix-multiplication-in-python/)

 __

143.[Memory Management in Python](/tutorials/software-engineering/python-tutorial/memory-management-in-python/)

 __

144.[Modulus in Python](/tutorials/software-engineering/python-tutorial/modulus-in-python/)

 __

145.[Mutable and Immutable in Python](/tutorials/software-engineering/python-tutorial/mutable-and-immutable-in-python/)

 __

146.[Namespace and Scope in Python](/tutorials/software-engineering/python-tutorial/namespace-and-scope-in-python/)

 __

147.[OpenCV Python](/tutorials/software-engineering/python-tutorial/opencv-python/)

 __

148.[Operator Overloading in Python](/tutorials/software-engineering/python-tutorial/operator-overloading-in-python/)

 __

149.[ord in Python](/tutorials/software-engineering/python-tutorial/ord-in-python/)

 __

150.[Palindrome in Python](/tutorials/software-engineering/python-tutorial/palindrome-in-python/)

 __

151.[Pass in Python](/tutorials/software-engineering/python-tutorial/pass-in-python/)

 __

152.[Pattern Program in Python](/tutorials/software-engineering/python-tutorial/pattern-program-in-python/)

 __

153.[Perfect Number in Python](/tutorials/software-engineering/python-tutorial/perfect-number-in-python/)

 __

154.[Permutation and Combination in Python](/tutorials/software-engineering/python-tutorial/permutation-and-combination-in-python/)

 __

155.[Prime Number Program in Python](/tutorials/software-engineering/python-tutorial/prime-number-program-in-python/)

 __

156.[Python Arrays](/tutorials/software-engineering/python-tutorial/python-arrays/)

 __

157.[Python Automation Projects Ideas](/tutorials/software-engineering/python-tutorial/python-automation-projects/)

 __

158.[Python Frameworks](/tutorials/software-engineering/python-tutorial/python-frameworks/)

 __

159.[Python Graphical User Interface GUI](/tutorials/software-engineering/python-tutorial/python-graphical-user-interface-gui/)

 __

160.[Python IDE](/tutorials/software-engineering/python-tutorial/python-ide/)

 __

161.[Python input and output](/tutorials/software-engineering/python-tutorial/python-input-and-output/)

 __

162.[Python Installation on Windows](/tutorials/software-engineering/python-tutorial/python-installation-on-windows/)

 __

163.[Python Object-Oriented Programming](/tutorials/software-engineering/python-tutorial/python-object-oriented-programming/)

 __

164.[Python PIP](/tutorials/software-engineering/python-tutorial/python-pip/)

 __

165.[Python Seaborn](/tutorials/software-engineering/python-tutorial/python-seaborn/)

 __

166.[Python Slicing](/tutorials/software-engineering/python-tutorial/python-slicing/)

 __

167.[type() function in Python](/tutorials/software-engineering/python-tutorial/python-type-function/)

 __

168.[Queue in Python](/tutorials/software-engineering/python-tutorial/queue-in-python/)

 __

169.[Replace in Python](/tutorials/software-engineering/python-tutorial/replace-in-python/)

 __

170.[Reverse a Number in Python](/tutorials/software-engineering/python-tutorial/reverse-a-number-in-python/)

 __

171.[Reverse a string in Python](/tutorials/software-engineering/python-tutorial/reverse-a-string-in-python/)

 __

172.[Reverse String in Python](/tutorials/software-engineering/python-tutorial/reverse-string-in-python/)

 __

173.[Stack in Python](/tutorials/software-engineering/python-tutorial/sack-in-python/)

 __

174.[scikit-learn](/tutorials/software-engineering/python-tutorial/scikit-learn/)

 __

175.[Selenium with Python ](/tutorials/software-engineering/python-tutorial/selenium-with-python/)

__

176.[Self in Python ](/tutorials/software-engineering/python-tutorial/self-in-python/)

__

177.[Sleep in Python](/tutorials/software-engineering/python-tutorial/sleep-in-python/)

 __

178.[Speech Recognition in Python](/tutorials/software-engineering/python-tutorial/speech-recognition-in-python/)

 __

179.[Split in Python](/tutorials/software-engineering/python-tutorial/split-in-python/)

 __

180.[Square Root in Python](/tutorials/software-engineering/python-tutorial/square-root-in-python/)

 __

181.[String Comparison in Python](/tutorials/software-engineering/python-tutorial/string-comparison-in-python/)

 __

182.[String Formatting in Python](/tutorials/software-engineering/python-tutorial/string-formatting-in-python/)

 __

183.[String Slicing in Python](/tutorials/software-engineering/python-tutorial/string-slicing-in-python/)

 __

184.[Strip in Python](/tutorials/software-engineering/python-tutorial/strip-in-python/)

 __

185.[Subprocess in Python](/tutorials/software-engineering/python-tutorial/subprocess-in-python/)

 __

186.[Substring in Python](/tutorials/software-engineering/python-tutorial/substring-in-python/)

 __

187.[Sum of Digits of a Number in Python](/tutorials/software-engineering/python-tutorial/sum-of-digits-of-a-number-in-python/)

 __

188.[Sum of n Natural Numbers in Python](/tutorials/software-engineering/python-tutorial/sum-of-n-natural-numbers-in-python/)

 __

189.[Sum of Prime Numbers in Python](/tutorials/software-engineering/python-tutorial/sum-of-prime-numbers-in-python/)

 __

190.[Switch Case in Python](/tutorials/software-engineering/python-tutorial/switch-case-in-python/)

 __

191.[Python Program to Transpose a Matrix](/tutorials/software-engineering/python-tutorial/transpose-of-a-matrix-in-python/)

 __

192.[Type Casting in Python](/tutorials/software-engineering/python-tutorial/type-casting-in-python/)

 __

193.[What are Lists in Python?](/tutorials/software-engineering/python-tutorial/what-are-lists-in-python/)

__

194.[Ways to Define a Block of Code](/tutorials/software-engineering/python-tutorial/what-do-we-use-to-define-a-block-of-code-in-python-language/)

 __

195.[What is Pygame](/tutorials/software-engineering/python-tutorial/what-is-pygame/)

 __

196.[Why Python is Interpreted Language?](/tutorials/software-engineering/python-tutorial/why-python-is-interpreted-language/)

__

197.[XOR in Python](/tutorials/software-engineering/python-tutorial/xor-in-python/)

 __

198.[Yield in Python ](/tutorials/software-engineering/python-tutorial/yield-in-python/)

__

199.[Zip in Python](/tutorials/software-engineering/python-tutorial/zip-in-python/)




# Binary Search in Python

Updated on 17/10/20245,681 Views

 __

Table of Content

  * introduction
  * overview
  * what is binary search in python?
  * concept of binary search
  * implementing a binary search in python
  * recursive python program for binary search
  * steps involved in the iterative approach
  * binary search complexity
  * conclusion
  * faqs



## Introduction

In today's data-driven world, searching algorithms are the anchor of many technologies. Efficient searching is not just an academic exercise but a practical necessity. This tutorial delves into binary search in Python, an algorithm that enhances performance and saves time in the real-world.

## Overview

In this tutorial, you'll learn the intricacies of implementing and understanding binary search in Python. We'll compare it with linear search, explore its algorithmic structure, and examine its time and space complexity.

## What is Binary Search in Python?

Binary search is an efficient algorithm for locating an item from a sorted list of items. In Python, this method is considerably faster than its counterpart, linear search, particularly for long lists. With each step, the algorithm eliminates half of the remaining items, resulting in a time complexity of O(log n).

In Python, binary search can be implemented using the standard library method bisect_left from the bisect module. You could also write a custom function to perform this search. This algorithm assumes that the list you're searching through is sorted, a pre-condition that must be met for the algorithm to work as expected.

### Linear Search vs. Binary Search

While linear search scans each element one by one, binary search takes advantage of the sorted list and progressively narrows down the search range by half, leading to significant performance gains.

### Why Use Binary Search in Python?

Binary search is widely used in Python for tasks such as data analysis, database searching, and any other use cases involving sorted lists or arrays. It reduces computational costs and is a foundational concept that every Python developer should understand.

## Concept of Binary Search

Grasping the underpinnings of the binary search algorithm in Python is essential for developers. It's not just an academic exercise but a skill you'll frequently use, especially in data manipulation tasks where search operations are inevitable. The reason for its significance is the algorithm's efficiency, both in terms of time and space. Let's delve deeper into its conceptual framework to understand what makes it tick.

### The Algorithm

Understanding binary search starts with its algorithmic design. Unlike linear search, which scans one item at a time, binary search quickly narrows down the area where the element can be found. Here's how it works:

  * ****List Must be Sorted:**** The very first requirement is that the list of items must be sorted. If the list isn't sorted, you'll need to sort it first, which would add to the time complexity.
  * ****Calculate the Middle Element:**** Identify the middle element of the array. This will be the starting point of the comparison.
  * ****Compare the Middle Element:**** If the middle element matches your target, your search is complete.
  * ****Narrow the Search:**** If the target value is less than or greater than the middle element, you will continue the search on either the left or right subarray, respectively.



### Time and Space Complexity

  * ****Time Complexity:**** Binary search has a time complexity of O(log n). This is incredibly efficient when you're dealing with large datasets.
  * ****Space Complexity:**** The algorithm operates in place, meaning it doesn't require additional memory allocation. Thus, it has a space complexity of O(1).



## Implementing a Binary Search in Python

****Code:****
    
    
     def binary_search(arr, target):  
        low = 0  
        high = len(arr) - 1  
          
        while low <= high:  
            mid = (low + high) // 2  
            if arr[mid] == target:  
                return mid  
            elif arr[mid] < target:  
                low = mid + 1  
            else:  
                high = mid - 1  
                  
        return -1  
      
    # Example usage  
    my_list = [1, 3, 5, 7, 9, 11, 13, 15]  
    target_value = 7  
    result = binary_search(my_list, target_value)  
    if result != -1:  
        print(f"Element {target_value} found at index {result}")  
    else:  
        print(f"Element {target_value} not found in the list")

****Explanation:****

****1****. The ****`binary_search`**** function takes two arguments: `****arr**** ` (the sorted array) and `****target**** ` (the value to search for).

****2.**** It initializes two pointers, `****low**** ` and `****high**** `, which represent the indices that define the current search range within the array. `****low**** ` is initially set to ****0**** , and `****high**** ` is set to the last index of the array ****(`len(arr) - 1`)****.

****3.**** Inside the `****while**** ` loop, the algorithm checks whether the `****low**** ` index is less than or equal to the `****high**** ` index. If this condition is true, it means there is still a valid search range to explore.

****4.**** The middle index `****mid**** ` of the current search range is calculated using the formula `****(low + high) // 2**** `. This index is used to access the element at the middle of the current search range.

****5.**** The algorithm compares the element at index `****mid**** ` with the target value. There are three possible cases:

  * If `****arr[mid]**** ` is equal to the `****target**** `, it means the target value has been found, and the function returns the index `****mid**** `.
  * If `****arr[mid]**** ` is less than the `****target**** `, it means the target value must be in the right half of the current search range. So, the `****low**** ` pointer is moved to `****mid + 1**** `.
  * If `****arr[mid]**** ` is greater than the `****target**** `, it means the target value must be in the left half of the current search range. So, the `****high**** ` pointer is moved to `****mid - 1**** `.



****6.**** Steps 4 and 5 are repeated in the `****while**** ` loop until either the target value is found or the `****low**** ` index becomes greater than the `****high**** ` index, indicating that the search range is exhausted.

****7.**** If the `****while**** ` loop completes without finding the target value, the function returns -1, indicating that the target value is not present in the array.

In this binary search program, the function is called with the sorted list `[1, 3, 5, 7, 9, 11, 13, 15]` and the target value `7`. The function correctly identifies that the target value `7` is present at index `3` in the array, and it prints "Element 7 found at index 3".

## Recursive Python Program for Binary Search

****Code:****
    
    
     def binary_search_recursive(arr, target, low, high):  
        if low <= high:  
            mid = (low + high) // 2  
            if arr[mid] == target:  
                return mid  
            elif arr[mid] < target:  
                return binary_search_recursive(arr, target, mid + 1, high)  
            else:  
                return binary_search_recursive(arr, target, low, mid - 1)  
        else:  
            return -1  
    my_list = [1, 3, 5, 7, 9, 11, 13, 15]  
    target_value = 7  
    result = binary_search_recursive(my_list, target_value, 0, len(my_list) - 1)  
    if result != -1:  
        print(f"Element {target_value} found at index {result}")  
    else:  
        print(f"Element {target_value} not found in the list")

****Explanation:****

****1.**** The function `****binary_search_recursive**** ` takes four arguments: `****arr**** ` (the sorted array), `****target**** ` (the value to search for), `****low**** ` (the starting index of the current search range), and `****high**** ` (the ending index of the current search range).

****2.**** The base case checks whether `****low**** ` is less than or equal to `****high**** `. If this condition is true, it means there is still a valid search range to explore. If the condition is false, it means the search range is exhausted, and the function returns -1 to indicate that the target value was not found.

****3.**** Inside the function, the middle index `****mid**** ` of the current search range is calculated using the formula `****(low + high) // 2**** `.

****4.**** The algorithm compares the element at index `****mid**** ` with the target value. There are three possible cases:

  * If `****arr[mid]**** ` is equal to the `****target**** `, it means the target value has been found, and the function returns the index `****mid**** `.
  * If `****arr[mid]**** ` is less than the `****target**** `, it means the target value must be in the right half of the current search range. So, the function calls itself recursively with updated parameters: `****mid + 1**** ` as the new `****low**** ` and the same `****high**** `.
  * If `****arr[mid]**** ` is greater than the `****target**** `, it means the target value must be in the left half of the current search range. So, the function calls itself recursively with updated parameters: the same `****low**** ` and `****mid - 1**** ` as the new `****high**** `.



****5.**** The function continues to recursively divide the search range in half until the base case is met (when `****low**** ` is no longer less than or equal to `****high**** `).

****6.**** If the target value is not found within the search range, the function returns -1.

In this Python program for binary search, the function is called with the sorted list `[1, 3, 5, 7, 9, 11, 13, 15]` and the target value `7`. The function correctly identifies that the target value `7` is present at index `3` in the array, and it prints "Element 7 found at index 3".

## Steps Involved in the Iterative Approach

****1\. Initialize Pointers:**** Begin by initializing two pointers, `****low**** ` and `****high**** `, which represent the range of indices in the sorted array where the target value could potentially exist. `****low**** ` is initialized to the first index ****(0)**** , and `****high**** ` is initialized to the last index ****(`len(arr) - 1`)****.

****2\. While Loop:**** Enter a `****while**** ` loop that continues as long as `****low**** ` is less than or equal to `****high**** `. This loop is responsible for narrowing down the search range.

****3\. Calculate Midpoint:**** Calculate the midpoint index `****mid**** ` of the current search range using the formula `****(low + high) // 2**** `. This index points to the middle element of the current search range.

****4\. Compare Midpoint Element:**** Compare the element at index `mid` with the target value:

  * If `****arr[mid]**** ` is equal to the target value, the search is successful, and `****mid**** ` is returned as the index where the target value was found.
  * If `****arr[mid]**** ` is less than the target value, it means the target value must be in the right half of the current search range. Update `****low**** ` to `****mid + 1**** ` to narrow down the search to the right half.
  * If `****arr[mid]**** ` is greater than the target value, it means the target value must be in the left half of the current search range. Update `****high**** ` to `****mid - 1**** ` to narrow down the search to the left half.



****5\. Repeat:**** Repeat steps 3 and 4 within the `****while**** ` loop until either the target value is found or the `****low**** ` index becomes greater than the `****high**** ` index, indicating that the search range is exhausted.

****6\. Return Result:**** If the target value is found, return the index `****mid**** ` where it was found. If the target value is not found after the `****while**** ` loop completes, return -1 to indicate that the target value is not present in the array.

## Binary Search Complexity

### Time Complexity

The time complexity of the binary search algorithm is ****O(log n)**** , where ****" n"**** is the number of elements in the sorted array.

This logarithmic time complexity is achieved because, at each step of the binary search, the size of the search range is cut in half. As a result, the number of iterations required to find the target value grows at a much slower rate compared to linear search algorithms.

In each iteration of the binary search, the search range is reduced to approximately half of the previous range. This halving effect leads to a balanced binary tree-like structure of the search process. As long as the elements are sorted, the algorithm can eliminate half of the remaining possibilities at each step, resulting in a very efficient search.

To summarize:

  * Best Case: ****O(1)**** \- In the best case, the target value is found at the first comparison.
  * Average and Worst Case: ****O(log n)**** \- In the average and worst cases, the algorithm divides the search range in half repeatedly until the target value is found or the search range becomes empty.



It's important to note that the binary search algorithm assumes that the input array is already sorted. Sorting the array initially can have a time complexity of ****O(n log n)**** , but once sorted, binary search offers efficient searching for multiple queries.

### Space Complexity

The space complexity of the binary search algorithm is ****O(1)**** , which means it uses a constant amount of additional memory regardless of the size of the input array.

Binary search is an iterative algorithm that doesn't require any data structures like arrays or lists to store intermediate results or recursive function calls (unlike some other algorithms). It only needs a few variables to keep track of the indices (`****low**** `, `****high**** `, and `****mid**** `) and the target value being searched for. These variables use a constant amount of memory, regardless of the size of the input array.

In terms of memory usage, binary search is very efficient and doesn't depend on the size of the input data. This makes it suitable for searching in large arrays, where space efficiency is a concern.

## Conclusion

In summary, understanding the concept of binary search is a cornerstone skill for Python developers, especially those working with data-intensive applications. The algorithm stands out for its efficiency, making it ideal for search operations in large, sorted datasets. The steps involved—sorting the list, calculating the middle element, and then methodically narrowing the search range—are straightforward but impactful in real-world applications.

As you continue your journey in Python, consider upskilling through upGrad's specialized courses to master algorithms like binary search and much more, thereby becoming a more versatile and effective programmer.

## FAQs

****1\. What is the difference between binary search and linear search in Python?****

Binary search is more efficient than linear search but requires the list to be sorted.

****2\. How do I implement binary search pseudocode in Python?****

You'll start by identifying the middle element and then narrowing your search range based on comparisons.

****3\. Can you provide a binary search example step by step?****

Absolutely, a step-by-step example would involve taking a sorted list, identifying the middle element, and then recursively or iteratively narrowing down the search range until the target value is found.

****4\. Is the binary search algorithm in Python different from other languages?****

The core algorithm remains the same across languages, but Python offers library methods like bisect_left.

****5\. Where can I find Python code for binary search?****

You can find various implementations on GitHub, Python's official documentation, or educational platforms like upGrad.

![image](/_ww3-next/image/?url=https%3A%2F%2Fd2o2utebsixu4k.cloudfront.net%2Fimage%202%20\(1\)-9cd0a42cab014b9e8d6d4c4ba3f27ab1.webp&w=3840&q=75)

Take our Free Quiz on Python

Answer quick questions and assess your Python knowledge

Start Quiz

![right-top-arrow](https://assets.upgrad.com/1961/_next/static/media/callbackform.d5182ef7.svg)

![image](/_ww3-next/image/?url=https%3A%2F%2Fik.imagekit.io%2Fupgrad1%2Fabroad-images%2Fauthor%2Fpavan-vadapalli%2FIMG_20191219_113908_1_96x96EAW41M.jpeg&w=3840&q=75)

[Pavan Vadapalli](https://www.upgrad.com/blog/author/pavanvadapalli/)

Author

Read More __

  *   * 





![image](https://d2o2utebsixu4k.cloudfront.net/image 5-dfda359a0c884b6496db7055ceb9f6bd.svg)

Join 10M+ Learners & Transform Your Career

Learn on a personalised AI-powered platform that offers best-in-class content, live sessions & mentorship from leading industry experts.

Explore Now![advertise-arrow](https://assets.upgrad.com/1961/_next/static/media/advertise.70befbac.svg)

## Free Courses

Explore Our Free Software Tutorials

Slide 1 of 3

![image](/_ww3-next/image/?url=https%3A%2F%2Fd2o2utebsixu4k.cloudfront.net%2FSoft-Skills-69e178f5061044c7bfbec9c968f5f0bc.png&w=3840&q=75)

Free Certificate

### JavaScript Basics From Scratch

In this beginner-friendly course, you will learn the fundamentals of programming with Java by exploring topics such as data types and variables, conditional statements, loops, and functions.

__

17 Hours

Enroll for Free

![image](/_ww3-next/image/?url=https%3A%2F%2Fd2o2utebsixu4k.cloudfront.net%2FManagement-94eb19d06cd74999a7e812f88a8ffc20.png&w=3840&q=75)

Free Certificate

### Data Structures and Algorithm

This course focuses on building your problem-solving skills to ace your technical interviews and excel as a Software Engineer. In this course, you will learn time complexity analysis, basic data structures like Arrays, Queues, Stacks, and algorithms such as Sorting and Searching.

__

17 Hours

Enroll for Free

![image](/_ww3-next/image/?url=https%3A%2F%2Fd2o2utebsixu4k.cloudfront.net%2FTechnology-7535435488d74a07966e0233f44ff90b.png&w=3840&q=75)

Free Certificate

### Core Java Basics

In this course, you will learn the concept of variables and the various data types that exist in Java. You will get introduced to Conditional statements, Loops and Functions in Java.

__

17 Hours

Enroll for Free

[View All Free Courses](https://www.upgrad.com/free-courses/it-technology/)

## upGrad Learner Support

Talk to our experts. We are available 7 days a week, 9 AM to 12 AM (midnight)

![text](/_ww3-next/image/?url=https%3A%2F%2Fd2o2utebsixu4k.cloudfront.net%2Findia1-390dca1223e54a018a1a1c918a5b28b1.png&w=64&q=75)

Indian Nationals

 __

1800 210 2020

![text](/_ww3-next/image/?url=https%3A%2F%2Fd2o2utebsixu4k.cloudfront.net%2Fother-4331459231704220a347793ecb11a642.png&w=64&q=75)

Foreign Nationals

 __

+918045604032

## Disclaimer

1.The above statistics depend on various factors and individual results may vary. Past performance is no guarantee of future results.

2.The student assumes full responsibility for all expenses associated with visas, travel, & related costs. upGrad does not provide any assurance or make representations regarding visa approval or the procurement of the visa.

3.upGrad does not grant credit; credits are granted, accepted or transferred at the sole discretion of an educational institution. upGrad does not make any representations regarding the recognition or equivalence of the credits or credentials awarded, unless otherwise expressly stated. If you intend to pursue a post graduate or doctorate degree upon completion of this course or apply for employment which requires specific credits, we advise you to enquire further regarding the suitability of this degree for your academic and/or professional requirements before enrolling.

4.Finance, No Cost EMI and Credit Card EMI options, are provided by third-party financial institutions. Terms and conditions are subject to change at their discretion without prior notice. Please verify details with the respective service provider before proceeding.

5.The estimates provided on savings are indicative and may vary based on the program, scholarships, and promotions available. Actual savings will depend on individual circumstances.

6.The savings figure is indicative and based on specific assumptions. Actual savings may vary depending on individual circumstances.

7.Cost-of-living estimates are indicative only and subject to variation based on personal lifestyle choices, location, exchange rates, and other factors. Actual expenses may differ from the stated figures.

1.The above statistics depend on various factors and individual results may vary. Past performance is no guarantee of future results.

2.The student assumes full responsibility for all expenses associated with visas, travel, & related costs. upGrad does not provide any a.

[![upgrad-logo](https://assets.upgrad.com/1961/_next/static/media/upGrad-logo.6366986e.svg)](/)

Building Careers of Tomorrow

  * [![facebook](https://assets.upgrad.com/1961/_next/static/media/fb-icon.9a9c3a8a.svg)](https://www.facebook.com/UpGradGlobal)
  * [![twitter](https://assets.upgrad.com/1961/_next/static/media/twitter-icon.d6ae04eb.svg)](https://twitter.com/UpGrad_Edu)
  * [![linkedin](https://assets.upgrad.com/1961/_next/static/media/linkedin-icon.27f5ae63.svg)](https://www.linkedin.com/company/ueducation)
  * [![youtube](https://assets.upgrad.com/1961/_next/static/media/YouTube.32a2da57.svg)](https://www.youtube.com/channel/UCO3pT4ZI8x2RVqYWxxcrZsw)



[ __ get the android app](https://play.google.com/store/apps/details?id=com.upgrad.student&hl=en_GB)[ __ GET THE IOS APP](https://apps.apple.com/in/app/upgrad/id1191301447)

upGrad

  * [About](https://www.upgrad.com/about/)
  * [Careers](https://www.upgrad.com/careers/)
  * [Placement Support](https://www.upgrad.com/placement-support/)
  * [upGrad Blog](https://www.upgrad.com/blog/)
  * [upGrad Tutorials](https://www.upgrad.com/tutorials/)
  * [Resources](https://www.upgrad.com/learn/)
  * [upGrad Free Courses](https://www.upgrad.com/free-courses/)
  * [For Teams](https://www.upgrad-enterprise.com/)
  * [Online Power Learning](https://www.upgrad.com/online-power-learning/)
  * [Xchange](https://www.upgrad.com/xchange/)
  * [BaseCamp](https://www.upgrad.com/basecamp/)
  * [For Business](https://www.upgrad-enterprise.com/)
  * [Watch Free Videos](https://www.upgrad.com/microlearn/short-videos)



Support

  * [Contact](https://www.upgrad.com/contact/)
  * [Experience Centers](https://www.upgrad.com/offline-centres/)
  * [Grievance Redressal](https://programs.upgrad.com/complaint-forum)
  * [Terms & Conditions](https://www.upgrad.com/terms/)
  * [Privacy Policy](https://www.upgrad.com/privacy/)
  * [CSR Policy](https://cdn.upgrad.com/upgradcdn/UpGrad/doc/UEPL_CSR+Policy.pdf)
  * [Report a Vulnerability](https://www.upgrad.com/report-a-vulnerability/)
  * [Annual Returns](http://d2o2utebsixu4k.cloudfront.net/upgrad/doc/Annual+Return_31st+March+2024.pdf)



MBA

  * [MBA by Liverpool Business School (IMT Pathway)](https://www.upgrad.com/mba-liverpool-business-school/)
  * [MBA from Golden Gate University](https://www.upgrad.com/mba-from-golden-gate-university/)
  * [PG Diploma in Management (BIMTECH)](https://www.upgrad.com/management-pgdm-bimtech/)
  * [Advanced Management Program from IMT Ghaziabad](https://www.upgrad.com/advanced-general-management-programme-imt-ghaziabad/)
  * [MBA from O.P. Jindal Global University](https://www.upgrad.com/mba-opj-global-university/)
  * [MBA from UGNXT](https://www.upgrad.com/mba-upgrad-college/)
  * [Global Business Management from GGU](https://www.upgrad.com/management-certificate-ggu/)
  * [PG in General Management from GIM](https://www.upgrad.com/pgp-in-general-management-gim/)
  * [Master’s in International Accounting and Finance from JGU](https://www.upgrad.com/msc-international-finance-and-accounting-jindal-global-university/)
  * [MBA in Business and Law from OPJ Global University](https://www.upgrad.com/mba-business-and-law-opj-global-university/)



Data Science & Analytics

  * [PG Diploma in Data Science from IIITB](https://www.upgrad.com/data-science-pgd-iiitb/)
  * [Data Science Master Degree from LJMU](https://www.upgrad.com/data-science-masters-degree-ljmu/)
  * [Executive PG in Data Science & ML from University of Maryland](https://www.upgrad.com/executive-pgp-in-data-science-business-analytics-maryland/)
  * [Certificate Program in AI and Data Science](https://www.upgrad.com/graduate-certificate-program-data-science-upgrad/)
  * [Data Science and Business Analytics Certification from University of Maryland](https://www.upgrad.com/data-science-and-business-analytics-certification-training/)
  * [Certificate in AI and Data Science Bootcamp](https://www.upgrad.com/bootcamps/job-linked-data-science-advanced-bootcamp/)



Doctorate 

  * [DBA from GGU](https://www.upgrad.com/dba-from-golden-gate-university/)
  * [DBA from ESGCI Paris](https://www.upgrad.com/doctor-of-business-administration-from-esgci/)
  * [DBA from Rushford Business School Switzerland](https://www.upgrad.com/dba-from-rushford-business-school/)
  * [Executive DBA from SSBM](https://www.upgrad.com/doctor-of-business-administration-ssbm/)
  * [DBA in Emerging Technologies with GenAI from GGU](https://www.upgrad.com/dba-emerging-technologies-specialization-in-gen-ai-ggu/)



Software & Tech 

  * [Executive Certification in Cloud Computing & DevOps from IIITB](https://www.upgrad.com/executive-pg-certification-in-cloud-computing-and-devops-iiit-bangalore/)
  * [Full Stack Software Development Bootcamp](https://www.upgrad.com/bootcamps/fullstack-development/)
  * [Cloud Engineer Bootcamp](https://www.upgrad.com/bootcamps/cloud-engineer-bootcamp/)
  * [UI/UX Design Certification Bootcamp](https://www.upgrad.com/bootcamps/ui-ux-design-course/)
  * [ITIL® 4 Foundation Certification Training](https://www.upgrad.com/it-service-management/itil-foundation-certification/)
  * [Python Programming Certification Training Course](https://www.knowledgehut.com/programming/python-programming-certification-training)
  * [Angular Programming Certification Training Course](https://www.knowledgehut.com/web-development/angular-js-training)
  * [React JS Certification Training Course](https://www.knowledgehut.com/web-development/react-js)
  * [CEH® v13 Certification Training Course](https://www.knowledgehut.com/it-security/ceh-ethical-hacking-certification-course)
  * [AWS Solutions Architect Associate Certification Training](https://www.knowledgehut.com/cloud-computing/aws-solution-architect-certification-training)
  * [AWS Cloud Practitioner Essentials Certification Training](https://www.knowledgehut.com/cloud-computing/aws-cloud-practitioner-essentials-certification)
  * [Azure Solution Architect Certification Training (AZ-305)](https://www.knowledgehut.com/cloud-computing/azure-solutions-architect-certification)
  * [Azure Administrator Certification Training (AZ-104)](https://www.knowledgehut.com/cloud-computing/microsoft-azure-administrator-training)
  * [Azure Data Engineering Certification Training (DP-203)](https://www.knowledgehut.com/cloud-computing/microsoft-azure-data-engineering-certification-training)



AI & ML

  * [Master's in ML & AI from LJMU](https://www.upgrad.com/masters-in-ml-ai-ljmu/)
  * [PG in ML & AI from IIIT B (Executive)](https://www.upgrad.com/machine-learning-ai-pgd-iiitb/)
  * [Executive PG in Data Science & ML from University of Maryland](https://www.upgrad.com/executive-pgp-in-data-science-business-analytics-maryland/)
  * [Advanced Certificate Program in Generative AI](https://www.upgrad.com/advanced-certificate-program-generative-ai/)
  * [Executive PG Certificate in Machine Learning & NLP from IIITB](https://www.upgrad.com/machine-learning-nlp-pgc-iiitb/)
  * [Executive PG Certificate in Machine Learning & Deep Learning from IIITB](https://www.upgrad.com/machine-learning-deep-learning-pgc-iiitb/)



Marketing

  * [Advanced Certificate in Digital Marketing & Communication from MICA](https://www.upgrad.com/digital-marketing-and-communication-pgc-mica/)
  * [Advanced Certificate in Brand Communication Management from MICA](https://www.upgrad.com/brand-and-communication-management-certificate-program-mica/)



Management

  * [Human Resource Analytics Course from IIM-K](https://www.upgrad.com/hrm-analytics-pcp-iimk/)
  * [PG Certificate in Product Management from Duke CE](https://www.upgrad.com/product-management/)
  * [Supply Chain Management Certification from MSU](https://www.upgrad.com/master-certificate-integrated-supply-chain-management-msu/)
  * [Advanced Management Program from IMT Ghaziabad](https://www.upgrad.com/advanced-general-management-programme-imt-ghaziabad/)
  * [Master’s in International Accounting and Finance from JGU](https://www.upgrad.com/msc-international-finance-and-accounting-jindal-global-university/)
  * [Product Management Certification from eCornell](https://www.upgrad.com/product-management-certificate-program-ecornell/)
  * [Strategic Human Resources Leadership Certification from eCornell](https://www.upgrad.com/strategic-human-resources-leadership-certificate-course-ecornell/)
  * [Human Resources Management Certification from eCornell](https://www.upgrad.com/human-resources-management-certificate-course-ecornell/)
  * [CSM® Certification Training](https://www.upgrad.com/agile-management/csm-certification-training/)
  * [CSPO® Certification Training](https://www.upgrad.com/agile-management/cspo-certification-training/)
  * [Leading SAFe® 6.0 Training Certification](https://www.upgrad.com/agile-management/leading-safe-certification-training/)
  * [SAFe® 6.0 POPM Certification](https://www.upgrad.com/agile-management/safe-product-manager-product-owner-training/)
  * [SAFe® 6.0 Scrum Master Certification Training](https://www.upgrad.com/agile-management/safe-scrum-master-with-ssm-certification-training/)
  * [Implementing SAFe® 6.0 with SPC Certification Training](https://www.upgrad.com/agile-management/spc-certification-training/)
  * [PMP® Certification Training](https://www.upgrad.com/project-management/pmp-certification-training/)
  * [PRINCE2® Foundation and Practitioner Certification](https://www.upgrad.com/project-management/prince2-certification-training/)



Law

  * [LLM in Corporate and Financial Law from JGU](https://www.upgrad.com/law-llm-corporate-and-finance-jgu/)
  * [LLM in Intellectual Property & Technology Law from JGLS](https://www.upgrad.com/law-llm-intellectual-property-technology-law-jgls/)
  * [LLM in Dispute Resolution from JGLS](https://www.upgrad.com/law-llm-dispute-resolution-jgls/)
  * [Contract Law Certificate Program](https://www.upgrad.com/contract-law-bootcamp/)



Job Linked

  * [Full Stack Software Development Bootcamp](https://www.upgrad.com/bootcamps/fullstack-development/)
  * [Certificate in AI and Data Science Bootcamp](https://www.upgrad.com/bootcamps/job-linked-data-science-advanced-bootcamp/)
  * [Cloud Engineer Bootcamp](https://www.upgrad.com/bootcamps/cloud-engineer-bootcamp/)
  * [UI/UX Design Certification Bootcamp](https://www.upgrad.com/bootcamps/ui-ux-design-course/)



Bootcamps

  * [Certificate in AI and Data Science Bootcamp](https://www.upgrad.com/bootcamps/job-linked-data-science-advanced-bootcamp/)
  * [Full Stack Software Development Bootcamp](https://www.upgrad.com/bootcamps/fullstack-development/)
  * [UI/UX Design Certification Bootcamp](https://www.upgrad.com/bootcamps/ui-ux-design-course/)
  * [Cloud Engineer Bootcamp](https://www.upgrad.com/bootcamps/cloud-engineer-bootcamp/)
  * [Data Engineer Bootcamp](https://www.knowledgehut.com/data-science/data-engineer-bootcamp-course)
  * [Artificial Intelligence Engineering Bootcamp](https://www.knowledgehut.com/data-science/ai-engineer-bootcamp-course)
  * [Front-End Development Bootcamp](https://www.knowledgehut.com/web-development/front-end-development-bootcamp-training)
  * [Back-End Development Bootcamp](https://www.knowledgehut.com/web-development/back-end-development-bootcamp-training)



Study Abroad

  * [Master of Business Administration (90 ECTS)](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-in-genenal-management-90-ects-imt-ism-germany/)
  * [MS in Data Analytics from Clark University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-data-analytics-iiitb-clark-usa/)
  * [MS in Project Management from Clark University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-project-management-iiitb-clark-usa/)
  * [MS in Information Technology from Clark University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-artificial-intelligence-iiitb-yeshiva-university-usa/)
  * [Masters Degree in Data Analytics & Visualization from Yeshiva University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-data-analytics-visualization-iiitb-yeshiva-university-usa/)
  * [Masters Degree in AI from Yeshiva University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-artificial-intelligence-iiitb-yeshiva-university-usa/)
  * [MBS in Entrepreneurship and Marketing from DKIT](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-business-studies-imtg-dkit-ireland/)
  * [MSc in Data Analytics from DKIT](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-data-analytics-iiitb-dkit-ireland/)
  * [MS in Data Analytics from JWU](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-data-analytics-iitb-jwu-usa/)
  * [MS in Computer Science from Troy University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-cs-iitb-troy-university-usa/)
  * [MS in Data Science from UWF](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-data-science-iiitb-university-of-west-florida-usa/)
  * [MS in Information Technology from UWF](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-it-iiitb-university-of-west-florida-usa/)
  * [MBA Course from Clarkson University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-imt-clarkson-university-usa/)
  * [MS in Applied Data Science from Clarkson University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-applied-data-science-iiitb-clarkson-university-usa/)
  * [MBA Course from Touro University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-imt-touro-university-usa/)
  * [MS in Data Analytics from Touro University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-data-analytics-iiitb-touro-university-usa/)
  * [MBA Course from Utica University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-imt-utica-university-usa/)
  * [MS in IT & Administration Management from CWU](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-in-it-and-administrative-management-iiitb-cwu-usa/)
  * [MS in Computer Science from City University of Seattle](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-in-cs-iiitb-city-university-of-seattle-usa/)
  * [MBA from City University of Seattle](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-imt-city-university-of-seattle-usa/)
  * [MBA General Management-90 ECTS](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-in-genenal-management-90-ects-imt-ism-germany/)
  * [MSc International Business Management from St. Mary's University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-international-business-management-imt-st-marys-university-london-uk/)
  * [MBA Course from Clark University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-imt-clark-university-usa/)
  * [MSc Business Intelligence & Data Science from ISM](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-business-intelligence-data-science-ggu-ism-germany/)
  * [MS Data Analytics from UNLV](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-data-analytics-iiitb-un-usa/)
  * [MSc International Business & Management from University of Suffolk](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-international-business-management-university-of-suffolk-uk/)
  * [MS Engineering Management from Drexel & IIITB](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-engineering-management-iiitb-du-us/)
  * [MS in Machine Learning Engineering from Drexel University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-machine-learning-engineering-iiitb-du-us/)
  * [MS in Engineering Management from Drexel & IMT](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-engineering-management-imtg-du-us/)
  * [MSc Data Engineering from Aivancity](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-in-data-engineering-iiitb-ast-paris/)
  * [MSc Artificial Intelligence Engineering from Aivancity](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-in-artificial-intelligence-engineering-iiitb-ast-paris/)
  * [MPS in Informatics Course from NEU](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mps-informatics-iiitb-nu-usa/)
  * [MPS in Applied Machine Intelligence from NEU](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mps-applied-machine-intelligence-iiitb-nu-usa/)
  * [MS in Project Management from NEU](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-project-management-iiitb-nu-usa/)
  * [MPS in Analytics Course from NEU](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mps-analytics-iiitb-nu-usa/)
  * [MS in Project Management from Northeastern University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-project-management-iiitb-neu-ca/)
  * [MS in Organizational Leadership from NEU](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-organizational-leadership-imtg-neu-usa/)
  * [MPS in Analytics from Northeastern University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mps-analytics-iiitb-nu-canada/)
  * [MBA with Specialization from American Business School](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-specialization-imtg-abs-paris/)
  * [MPS in Informatics from Northeastern University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mps-informatics-iiitb-nu-canada/)
  * [MBA Course from UCW](https://www.upgrad.com/study-abroad/ua-accelerator-programs/mba-imt-ucw-canada/)
  * [MS in Digital Marketing and Media from Yeshiva University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-digital-marketing-media-mica-ind-yu-usa/)
  * [MSc Sustainable Tourism & Event Management from ESDES Business School](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-sustainable-tourism-event-management-imtg-esdes-france/)
  * [MSc Circular Economy & Sustainable Innovation from ESDES Business School](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-circular-economy-sustainable-innovation-imtg-esdes-france/)
  * [MSc Impact Finance & Fintech Management from ESDES Business School](https://www.upgrad.com/study-abroad/ua-accelerator-programs/msc-impact-finance-fintech-management-imtg-esdes-france/)
  * [MS Computer Science from Clark University](https://www.upgrad.com/study-abroad/ua-accelerator-programs/ms-computer-science-iiitb-clark-university-us/)



For College Students

  * [Business Analytics & Consulting with PwC India](https://www.upgrad.com/business-analytics-certification-pwc-india/)
  * [Financial Modelling & Analysis with PwC India](https://www.upgrad.com/certification-program-in-financial-modelling-and-analysis/)



Supply Chain Management

  * [Supply Chain Management Certification from MSU](https://www.upgrad.com/master-certificate-integrated-supply-chain-management-msu/)



Archived Programs

  * [Full Stack Development Course by IIITB](https://www.upgrad.com/full-stack-developer-course-pgd-iiitb/)
  * [General Management Certification from IIM-K](https://www.upgrad.com/professional-certificate-program-general-management-iimk/)
  * [Marketing and Sales Management Certification from IIM-K](https://www.upgrad.com/professional-certificate-program-marketing-sales-management-iimk/)
  * [Master of Laws (LLM) from GGU](https://www.upgrad.com/llm-from-golden-gate-university/)
  * [Advanced Marketing Management Certificate from MICA](https://www.upgrad.com/certificate-program-in-marketing-leadership-development-mica/)



© 2015-2025 upGrad Education Private Limited. All rights reserved


