Posts From Python Programming Examples

Principal Component Analysis For Image Data

Principal Component Analysis For Image Data in Python

We’ve already worked on PCA in a previous article. In this article, let’s work on Principal Component Analysis for image data. PCA is a famous unsupervised dimensionality reduction technique that comes to our rescue whenever the curse of dimensionality haunts us. Working with image data is a little different than the usual datasets. A typical […]

0:1 Knapsack

Solving 0/1 Knapsack Using Dynamic programming in Python

In this article, we’ll solve the 0/1 Knapsack problem using dynamic programming. Dynamic Programming is an algorithmic technique for solving an optimization problem by breaking it down into simpler subproblems and utilizing the fact that the optimal solution to the overall problem depends upon the optimal solution to its subproblems. 0/1 Knapsack is perhaps the […]

Density Plots In Python

Density Plots in Python – A Comprehensive Overview

A density plot is used to visualize the distribution of a continuous numerical variable in a dataset. It is also known as Kernel Density Plots. It’s a good practice to know your data well before starting to apply any machine learning techniques to it. As a good ML practitioner we should be asking some questions […]

Trie Implementation

Implementing a Trie Data Structure in Python

Trie data structure is very efficient when it comes to information retrieval. It is majorly used in the implementation of dictionaries and phonebooks. It is also useful for implementing auto-text suggestions you see while typing on a keyboard. In this tutorial, we will understand how to implement our own trie data structure in Python. In […]

Nans

Understanding NaN in Numpy and Pandas

NaN is short for Not a number. It is used to represent entries that are undefined. It is also used for representing missing values in a dataset. The concept of NaN existed even before Python was created. IEEE Standard for Floating-Point Arithmetic (IEEE 754) introduced NaN in 1985. NaN is a special floating-point value which […]

MEAN ABSOLUTE PERCENTAGE ERROR

MAPE – Mean Absolute Percentage Error in Python

Hello, readers! In our series of Error Metrics, we have understood and implemented Root Mean Square Error. Today, we will be focusing on another important error metric in model building — Mean Absolute Percentage Error (MAPE) in Python. What is MAPE? Mean Absolute Percentage Error (MAPE) is a statistical measure to define the accuracy of […]