<jupyter_start><jupyter_text>CS109A Introduction to Data Science:  Homework 5  AC 209 : PCA**Harvard University****Fall 2019****Instructors**: <NAME>, <NAME>, and <NAME><jupyter_code># RUN THIS CELL FOR FORMAT
import requests
from IPython.core.display import HTML
styles = requests.get("https://raw.githubusercontent.com/Harvard-IACS/2018-CS109A/master/content/styles/cs109.css").text
HTML(styles)
# Imports
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import make_regression
from sklearn.linear_model import LinearRegression, Ridge, Lasso, ElasticNet, RidgeCV, LassoCV, ElasticNetCV
from sklearn.model_selection import train_test_split
from sklearn.metrics import r2_score

%matplotlib inline<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09587217043941411, 'fraction_numerical': 0.02929427430093209, 'mean_word_length': 7.263736263736264, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 1, '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': '175508', 'license': 'MIT', 'n_tokens_mistral': 259, 'n_tokens_neox': 238, 'n_words': 63, 'path': 'Homework/hw5/ac209a_HW5_2019_solutions.ipynb', 'repo_name': 'jzhang1031/2019-CS109A', 'size': '773'}