Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
About Article
Analyze Data
Archive
Best Practices
Better Outputs
Blog
Code Optimization
Code Quality
Command Line
Daily tips
Dashboard
Data Analysis & Manipulation
Data Engineer
Data Visualization
DataFrame
Delta Lake
DevOps
DuckDB
Environment Management
Feature Engineer
Git
Jupyter Notebook
LLM
LLM
Machine Learning
Machine Learning
Machine Learning & AI
Manage Data
MLOps
Natural Language Processing
NumPy
Pandas
Polars
PySpark
Python Tips
Python Utilities
Python Utilities
Scrape Data
SQL
Testing
Time Series
Tools
Visualization
Visualization & Reporting
Workflow & Automation
Workflow Automation

Visualization

Plot a Pretty and Comprehensible Confusion Matrix in Python

It can be difficult to understand a confusion matrix, especially when there are many classes in the target. To make your confusion matrix prettier and easier to understand, use pretty_confusion_matrix.

The code is written by wagnerbhbr. I turned this code into a PyPI package so that it can be used by anybody.

Link to pretty_confusion_matrix.

My previous tips on data visualization.
Favorite

Plot a Pretty and Comprehensible Confusion Matrix in Python Read More »

Mermaid: Create Class Diagrams for Your Python Classes Using Text and Code

If you want to create class diagrams to explain your Python classes, use Mermaid. Mermaid lets you create diagrams and visualizations using text and code.

For example, writing this piece of code on Mermaid Live Editor:

… will create a diagram like above.

Find other diagrams you can create with Mermaid here.
Favorite

Mermaid: Create Class Diagrams for Your Python Classes Using Text and Code Read More »

Evidently: Detect and Visualize Data Drift

Data drift is unexpected changes in model input data that can lead to model performance degradation. Since your code is built around the characteristics of your data, it is important to detect data drift when it occurs.

Evidently allows you to do exactly in a few lines of Python code. In the code below, I use Evidently to detect changes in feature distribution.

Code to create the report above.

Link to Evidently.
Favorite

Evidently: Detect and Visualize Data Drift Read More »

Visualize Similarities Between Companies With Graph Database

Have you ever been curious about the similarities between different companies? Wouldn’t it be nice if you can visualize their relationships like above?

That is when graph database and Neo4j come in handy. In my latest article, you will learn what Neo4j is and how to use it to analyze the similarities between artificial intelligence companies. 

Link to the article.

Link to the source code:
Favorite

Visualize Similarities Between Companies With Graph Database Read More »

 missingno.dendogram: Visualize Correlation Between Missing Data

Missing values can sometimes tell you how strongly the presence or absence of one variable affects the presence of another.

To visualize the correlation between different columns based on the missing values, use missingno.dendogram.

The dendrogram uses a hierarchical clustering algorithm to bin variables against one another by their nullity correlation. Cluster leaves which linked together at a distance of zero fully predict one another’s presence. 

Link to missingno.

Link to my previous tips on visualization tools in Python.
Favorite

 missingno.dendogram: Visualize Correlation Between Missing Data Read More »

How to Sketch your Data Science Ideas With Excalidraw

If you want your manager or colleague to understand your ideas for a project, don’t show them only words or a chunk of code. Use graphs or diagrams.
Imagine you want to explain with your manager the process of training a cat classifier, it would be easier for them to understand the process by showing them a picture like above.
Drawing is also a good way to outline what you want to do before tackling a project.
There are many tools to draw diagrams, but the one I like the most is Excalidraw. In my latest article, I will show you what Excalidraw is and why it is one of the best tools to draw diagrams.
Link to the article.Favorite

How to Sketch your Data Science Ideas With Excalidraw Read More »

How to Create Bindings and Conditions Between Multiple Plots Using Altair

Have you ever wanted to see one plot change when you interact with another plot like above? That is when Altair comes in handy.
Altair is a Python library that allows you to create concise visualization grammar and quickly build statistical graphics.
In my latest article, I will show how you can create bindings and conditions between multiple plots using Altair.
Link to the article about Altair.
Link to the source code.Favorite

How to Create Bindings and Conditions Between Multiple Plots Using Altair Read More »

Graphviz: Create a Flowchart to Capture your Ideas in Python

A flowchart is helpful for summarizing and visualizing your workflow. This also helps your team understand your workflow. Wouldn’t it be nice if you could create a flowchart using Python?
Graphviz makes it easy to create a flowchart like above. The code snippet above shows how to create one using graphviz.
Here is the link to graphviz.Favorite

Graphviz: Create a Flowchart to Capture your Ideas in Python Read More »

Create an interactive map in Python

If you want to create a map provided the location in a few lines of code, try folium. Folium is a Python library that allows you to create an interactive map.
You can create an interactive map and add a marker like this with the code above.

View the document of folium here.

I used this library to view the locations of the owners of top machine learning repositories. Pretty cool to see their locations through an interactive map.

Favorite

Create an interactive map in Python Read More »

Weight and Biases: Compare the performance between different models if you run one model on different data

It can be difficult to compare the performance between different models if you run one model on different data. Pretty happy to see clearly the comparison in performance between different model versions with Weight and Biases. The graphs shown below indicate the average performance of different models on different metricsFavorite

Weight and Biases: Compare the performance between different models if you run one model on different data Read More »

0
    0
    Your Cart
    Your cart is empty
    Scroll to Top

    Work with Khuyen Tran

    Work with Khuyen Tran