Data Visualization Cheat Sheet for Basic Machine Learning Algorithms | by Boriharn K | Mar, 2024

Data Visualization Cheat Sheet for Basic Machine Learning Algorithms | by Boriharn K | Mar, 2024

[ad_1]

Before continuing, please take into account that the data visualizations recommended in the cheat sheet are just some quick initial ideas. There may be cases where these charts are unsuitable to use. Next, I will guide you with examples of how to plot the charts using Python.

Let’s get started.

Start with importing libraries:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline

This article is going to use the iris dataset, which can be directly downloaded from the Sklearn library. The dataset can also be found on the UCI ML iris data and is licensed under a CC BY 4.0 license.

This article will mainly focus on the ‘sepal length’ and ‘sepal width’ attributes. If you want to try with other datasets, feel free to modify the code below or skip this part.

from sklearn.datasets import load_iris
data = load_iris()

df = pd.DataFrame(data = data.data, columns = data.feature_names)
df_t = pd.DataFrame(data = data.target, columns = ['label'])

df_iris =…

[ad_2]
Source link

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *