Programming Articles

Page 132 of 2547

What is the purpose of a density plot or kde plot?

Md Waqar Tabish
Md Waqar Tabish
Updated on 27-Mar-2026 4K+ Views

A density plot, also known as a kernel density estimate (KDE) plot, is a statistical visualization that shows the probability density function of a dataset. Unlike histograms that use discrete bins, density plots create smooth curves to represent data distribution, making them ideal for identifying patterns, trends, and the underlying shape of your data. Purpose and Advantages The primary purpose of a density plot is to provide a continuous view of data distribution. Here are the key advantages over traditional histograms ? Smooth representation: Creates continuous curves instead of jagged bin-based displays Bin-independent: Not affected by ...

Read More

What is the Difference between stripplot() and swarmplot()?

Md Waqar Tabish
Md Waqar Tabish
Updated on 27-Mar-2026 2K+ Views

Seaborn provides two powerful plotting functions for displaying categorical data distributions: stripplot() and swarmplot(). While both create scatter plots along categorical axes, they differ significantly in how they handle overlapping points. What is stripplot()? The stripplot() function creates a scatter plot where data points are positioned along a categorical axis. Points may overlap when they have similar values, which can make it difficult to see the true density of data points. Basic stripplot() Example import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Create sample data df = pd.DataFrame({ ...

Read More

Least Frequently Used (LFU) Implementation

Diksha Patro
Diksha Patro
Updated on 27-Mar-2026 647 Views

A Least Frequently Used (LFU) cache is a memory management strategy that removes the least frequently accessed items when the cache reaches capacity. Unlike LRU (Least Recently Used), LFU tracks how often each item is accessed and evicts items with the lowest usage count. In an LFU cache, each item maintains a frequency counter that increments every time it's accessed. When eviction is needed, the item with the smallest frequency count is removed first. How LFU Cache Works The LFU algorithm follows these principles: Frequency Tracking: Each cached item has an associated usage count Eviction ...

Read More

How to Perform Grubbs Test in Python

Gourav Bais
Gourav Bais
Updated on 27-Mar-2026 3K+ Views

The Grubbs test is a statistical hypothesis testing method to detect outliers in a dataset. Outliers are observations that disturb the data distribution and can cause models to overfit. This article explains what the Grubbs test is and demonstrates how to implement it in Python using both built-in libraries and manual formula implementation. What are Outliers? Outliers are data points that are numerically distant from other observations in the dataset. For normally distributed data, approximately 68% of records should fall within one standard deviation, 95% within two standard deviations, and 99.7% within three standard deviations of the mean. ...

Read More

How to Perform an F-Test in Python

Gourav Bais
Gourav Bais
Updated on 27-Mar-2026 4K+ Views

Statisticians use F-test to check whether the two datasets have the same variance or not. F-test is named after Sir Ronald Fisher. To use the F-Test, we make two hypotheses: a null hypothesis and one alternate hypothesis. Then we select any of these two hypotheses based on the F-Test results. Variance is a data distribution metric that measures data deviation from the mean. Higher values show more dispersion than smaller values. In this article, you will learn how to perform an F-Test in Python programming language with its use cases. F-Test Process The process to perform ...

Read More

How to Perform a Chi-Square Goodness of Fit Test in Python

Gourav Bais
Gourav Bais
Updated on 27-Mar-2026 4K+ Views

Data Scientists often use statistical methods for hypothesis testing to gain insights from datasets. The Chi-Square Goodness of Fit Test is a statistical method that validates whether observed categorical data follows an expected distribution. It helps determine if sample data significantly differs from what we would expect under a specific hypothesis. Understanding Chi-Square Goodness of Fit Test The Chi-Square Goodness of Fit test compares observed frequencies with expected frequencies to determine if there is a significant difference. This test makes several important assumptions ? Variables are independent Only one categorical feature is present Each category must ...

Read More

How to Perform a Brown ñ Forsythe Test in Python

Gourav Bais
Gourav Bais
Updated on 27-Mar-2026 552 Views

The Brown-Forsythe test is a statistical test used to determine whether the variances of two or more groups are equal. While Levene's test uses the absolute deviations from the mean, the Brown-Forsythe test uses the deviations from the median, making it more robust to outliers and non-normal data. Hypothesis The Brown-Forsythe test evaluates the following hypotheses − H0 (Null Hypothesis): The variances of all groups are equal H1 (Alternative Hypothesis): At least one group has a different variance How the Test Works The test calculates each group's median and determines the absolute deviations ...

Read More

Create XML Documents using Python

Tamoghna Das
Tamoghna Das
Updated on 27-Mar-2026 28K+ Views

XML documents are essential for data exchange between systems. Python provides the xml.etree.ElementTree library for creating and manipulating XML documents easily. Let's explore how to create both simple and complex XML structures using Python. Basic XML Document Creation Setting Up ElementTree First, import the ElementTree library and create a root element ? import xml.etree.ElementTree as ET # Create root element root = ET.Element('root') # Create child elements person = ET.SubElement(root, 'person') name = ET.SubElement(person, 'name') age = ET.SubElement(person, 'age') # Set text content name.text = 'John Doe' age.text = '30' # ...

Read More

Creating a Dataframe using CSV files

Tamoghna Das
Tamoghna Das
Updated on 27-Mar-2026 6K+ Views

A DataFrame is a powerful two-dimensional data structure in Python's pandas library, similar to a spreadsheet. CSV files are the most common way to store tabular data. This article demonstrates how to create DataFrames from CSV files and perform essential data operations. What are DataFrames and CSV Files? A DataFrame is a two-dimensional, size-mutable, tabular data structure with columns of potentially different types. It's similar to a spreadsheet or SQL table, commonly used for data analysis in Python. A CSV (Comma-Separated Values) file stores data in tabular format, with each row representing a record and columns separated ...

Read More

Creating a radar sweep animation using Pygame in Python

Tamoghna Das
Tamoghna Das
Updated on 27-Mar-2026 1K+ Views

Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. A radar sweep animation creates a rotating line that sweeps across a circular display, commonly used in games and simulations to represent detection systems. Components of a Radar Sweep Animation A basic radar sweep animation consists of the following components − Radar Circle − The circular boundary representing the radar's detection range Radar Sweep − A rotating line that sweeps around the center at 360 degrees Radar ...

Read More
Showing 1311–1320 of 25,469 articles
« Prev 1 130 131 132 133 134 2547 Next »
Advertisements