Posts From Python Programming Examples

Hierarchical Clustering Feature Image

Hierarchical Clustering with Python

Clustering is a technique of grouping similar data points together and the group of similar data points formed is known as a Cluster. There are often times when we don’t have any labels for our data; due to this, it becomes very difficult to draw insights and patterns from it. Unsupervised Clustering techniques come into […]

Plotting K Means Clusters With Python

How to Plot K-Means Clusters with Python?

In this article we’ll see how we can plot K-means Clusters. K-means Clustering is an iterative clustering method that segments data into k clusters in which each observation belongs to the cluster with the nearest mean (cluster centroid). Steps for Plotting K-Means Clusters This article demonstrates how to visualize the clusters. We’ll use the digits dataset for our cause. 1. Preparing Data […]

Treemap Python

How to Plot a Treemap in Python?

A treemap in Python is a visualization of data that splits a rectangle into sub-parts. The size of each subpart is in proportion to the data it represents. It is somewhat like a pie-chart. Although, treemaps can represent much-more complex data as compared to a pie-chart. It can help you visualize how single values compose […]

Naive Bayes Classifier With Python

Naive Bayes Classifier with Python

Naïve Bayes Classifier is a probabilistic classifier and is based on Bayes Theorem. In Machine learning, a classification problem represents the selection of the Best Hypothesis given the data. Given a new data point, we try to classify which class label this new data instance belongs to. The prior knowledge about the past data helps […]

Quicksort

How to Implement QuickSort in Python?

Quicksort is a sorting algorithm that follows the policy of divide and conquer. It works on the concept of choosing a pivot element and then arranging elements around the pivot by performing swaps. It recursively repeats this process until the array is sorted. In this tutorial we will learn how QuickSort works and how to […]

Monte Carlo In Python

Monte Carlo in Python

Today we look at a very famous method called the Monte Carlo, which can be used to solve any problem having a probabilistic interpretation.