## Python: Finding the number of clusters (components) in data using the Gaussian mixture model

A Gaussian mixture model (GMM) is a probabilistic mixture model (combination of multiple probability distribution functions). It assumes that the data points are generated from a mixture of “K” Gaussian (normal) distributions with unknown parameters. The most common technique to estimate the unknown parameters for …

## Python code to split probabilities/numbers in multiple bins

There could be multiple ways to split 100s of probability values or numbers into 10 or 100 bins. I am going to show you a short Python code to do this. The code uses different functions of the Numpy library. In this code, I will …

Youtube and Dailymotion are the two biggest video hosting websites that provide embed code to show videos on any website. If you want to host some videos, you do not have to worry about buying a server or a VPS. You can upload your videos …

## Python code to compute machine learning classification evaluation metrics (Accuracy, AUC-ROC, MCC) using sklearn library

There are several evaluation metrics (e.g., accuracy, AUC-ROC, Mathew correlation coefficient, precision, recall, F1 score, confusion matrix, etc.) that are used to determine the performance of supervised machine learning classification algorithms. The selection of a metric to assess the performance of a classification algorithm depends …

## Python code to download all images (Image Scraping) from a webpage

If a webpage has many photos and you want to download all of them, manual download is not a good option as it can take several minutes. You need some script that can scrape images from the page. In this post, I have written a …

## Matplotlib: Python code to plot bar charts with error bars

A bar chart (bar graph) is used to present categorical data with rectangular bars with heights or lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally. In this post, I will generate a bar graph with error bars …