<jupyter_start><jupyter_text>Polynomial Regression (Degree 2)  Import Dataset, Split X,Y<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
trainDF = pd.read_csv('E:/Sem5/ML-Final-Project/Dataset/train.csv', low_memory=False)
valDF = pd.read_csv('E:/Sem5/ML-Final-Project/Dataset/val.csv', low_memory=False)
testDF = pd.read_csv('E:/Sem5/ML-Final-Project/Dataset/test.csv', low_memory=False)
train_X = trainDF.drop(columns=['data_IMDBscore'])
train_Y = trainDF['data_IMDBscore']
val_X = valDF.drop(columns=['data_IMDBscore'])
val_Y = valDF['data_IMDBscore']
test_X = testDF.drop(columns=['data_IMDBscore'])
test_Y = testDF['data_IMDBscore']
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
poly_2 = PolynomialFeatures(degree=2, interaction_only=False, include_bias=False)
train_poly_2_X = poly_2.fit_transform(train_X)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12219959266802444, 'fraction_numerical': 0.008146639511201629, 'mean_word_length': 8.637254901960784, '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': '618136', 'license': 'CC0-1.0', 'n_tokens_mistral': 365, 'n_tokens_neox': 357, 'n_words': 58, 'path': 'Regression/Linear_Regression_Degree_2.ipynb', 'repo_name': 'yb24/IMDb-Movie-Rating-Predictor', 'size': '982'}