<jupyter_start><jupyter_text>parallel coordinate plot of a wheat dataset* for easier interpretation, features should be of similar scales<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
from pandas.tools.plotting import parallel_coordinates as parcor
# load the data
flc = '/Users/pinqingkan/Desktop/Codes/Course_edX_PythonDataScience/03_ExploratoryAnalysis/Datasets/'
fname = flc + 'wheat.data'
X = pd.read_csv(fname, index_col = 0)
X.columns
Y = X.drop(labels = ['area', 'perimeter'], axis = 1)
Y.columns
# parallel coordinate plot
parcor(Y, 'wheat_type', alpha = 0.7)
plt.show()
parcor(X, 'wheat_type', alpha = 0.7)
plt.show()
Z = pd.concat([Y, X[['area', 'perimeter']]], axis = 1)
parcor(Z, 'wheat_type', alpha = 0.7)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13607188703465983, 'fraction_numerical': 0.014120667522464698, 'mean_word_length': 6.027027027027027, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '275871', 'license': 'MIT', 'n_tokens_mistral': 298, 'n_tokens_neox': 282, 'n_words': 73, 'path': 'Lab3_ExploratoryAnalysis/assignment4.ipynb', 'repo_name': 'rongqingpin/Python_Data_Science_edX_DAT210x', 'size': '779'}