Machine Learning, Python, Towards Data Science, Dimensionality Reduction, Data Visualization.
import matplotlib.pyplot as plt import seaborn as sns tf_pca = TF_PCA(iris_dataset.data, iris_dataset.target) tf_pca.fit() pca = tf_pca.reduce(keep_info=0.9) # Results in 2 dimensions color_mapping = {0: sns.xkcd_rgb['bright purple'], 1: sns.xkcd_rgb['lime'], 2: sns.xkcd_rgb['ochre']} colors =