<jupyter_start><jupyter_text>Principal Component Analysis (PCA) in Pythonhttps://www.datacamp.com/community/tutorials/principal-component-analysis-in-python<jupyter_code>from sklearn.datasets import load_breast_cancer
breast = load_breast_cancer()
breast_data = breast.data
breast_data.shape
breast_labels = breast.target
breast_labels.shape
import numpy as np
labels = np.reshape(breast_labels,(569,1))
final_breast_data = np.concatenate([breast_data,labels],axis=1)
final_breast_data.shape
import pandas as pd
breast_dataset = pd.DataFrame(final_breast_data)
features = breast.feature_names
features
features_labels = np.append(features,'label')
breast_dataset.columns = features_labels
breast_dataset.head()
breast_dataset['label'].replace(0, 'Benign',inplace=True)
breast_dataset['label'].replace(1, 'Malignant',inplace=True)
breast_dataset.tail()
from keras.datasets import cifar10
(x_train, y_train), (x_test, y_test) = cifar10.load_data()

print('Traning data shape:', x_train.shape)
print('Testing data shape:', x_test.shape)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11571025399811853, 'fraction_numerical': 0.010348071495766699, 'mean_word_length': 9.23076923076923, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '593821', 'license': 'MIT', 'n_tokens_mistral': 380, 'n_tokens_neox': 369, 'n_words': 62, 'path': 'tutorials/principle_component_analysis.ipynb', 'repo_name': 'PhysicsUofRAUI/some-kaggle-notebooks', 'size': '1063'}