EDA with Sklearn examples
code adapted from: https://github.com/thomasjpfan/ml-workshop-intro
## Reading the dataset using pandas
import pandas as pd
url = 'https://raw.githubusercontent.com/davidrkearney/colab-notebooks/main/datasets/CTG.csv'
df = pd.read_csv(url, error_bad_lines=False)
df
## Dropping the columns which we don't need
df=df.drop(["FileName","Date","SegFile","b","e"],axis=1)
df.head()
df['C']
X = df['C']
X
y = df['NSP']
y
import seaborn as sns
sns.set_theme(font_scale=1.5)
df.columns
sns.relplot(data=df, x='B', y='NSP', height=6);
sns.displot(data=df, x='B', hue='NSP', kind='kde', aspect=2);
sns.jointplot(data=df, x="B", y="C", height=10, hue='NSP');
sns.jointplot(x="C", y="B", data=df, height=10, hue='NSP')