4번
3번, 5번
# 필요한 라이브러리와 데이터 로드
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn.datasets import load_iris
iris_raw = load_iris(as_frame=True)
iris_data = iris_raw['data']
iris_target = iris_raw['target']
iris_data.columns
fig0, ax0 = plt.subplots()
fig1, ax1 = plt.subplots()
ax0.scatter(iris_data['sepal length (cm)'], iris_data['sepal width (cm)'], color='red')
ax0.set_xlabel('sepal length (cm)')
ax0.set_ylabel('sepal width (cm)')
ax1.scatter(iris_data['petal length (cm)'], iris_data['petal width (cm)'], color='blue')
ax1.set_xlabel('petal length (cm)')
ax1.set_ylabel('petal width (cm)')


mean = np.mean(iris_data, axis=0)
std = np.std(iris_data, axis=0)
iris_std = (iris_data - mean) / std
fig0, ax0 = plt.subplots()
fig1, ax1 = plt.subplots()
ax0.scatter(iris_std['sepal length (cm)'], iris_std['sepal width (cm)'], color='red')
ax0.set_xlabel('sepal length')
ax0.set_ylabel('sepal width')
ax1.scatter(iris_std['petal length (cm)'], iris_std['petal width (cm)'], color='blue')
ax1.set_xlabel('petal length')
ax1.set_ylabel('petal width')

