<jupyter_start><jupyter_text><jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
dataFrame = pd.read_csv("19BCE0436_Multilinear_Regression.csv")
dataFrame.head()
y = dataFrame['Y']
x1 = dataFrame['X1']
x2 = dataFrame['X2']
y = np.array(y)
x1 = np.array(x1)
x2 = np.array(x2)<jupyter_output><empty_output><jupyter_text><jupyter_code>x1Square = [x*x for x in x1]
x2Square = [x*x for x in x2]
sumX1Square = sum(x1Square)
sumX2Square = sum(x2Square)
prodX1X2 = []
prodX1Y = []
prodX2Y = []
for i in range(len(x1)):
  prodX1X2.append(x1[i] * x2[i])
  prodX1Y.append(x1[i] * y[i])
  prodX2Y.append(x2[i] * y[i])
X1X2Square = [x*x for x in prodX1X2]
sumX1Y = sum(prodX1Y)
sumX2Y = sum(prodX2Y)
sumX1X2 = sum(prodX1X2)
print(sumX1Y,"\n",sumX2Y,"\n",sumX1X2)
coefficientB1 = ((sumX2Square*sumX1Y) - (sumX1X2*sumX2Y))/((sumX1Square*sumX2Square) - (sumX1X2*sumX1X2))
num1 = ((sumX2Square*sumX1Y) - (sumX1X2*sumX2Y))
num2 = ((sumX1Square*sumX2Y) - (sumX1X2*sumX1Y))
den = ((sumX1Square*sumX2Square) - (sumX1X2*sumX1X2))
coefficientB2 = ((sumX1Square*sumX2Y) - (sumX1X2*sumX1Y))/((sumX1Square*sumX2Square) - (sumX1X2*sumX1X2))
coefficientB1
coefficientB2
print(num1,"\n",num2,"\n",den)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17408906882591094, 'fraction_numerical': 0.07854251012145749, 'mean_word_length': 7.078431372549019, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '58890', 'license': 'MIT', 'n_tokens_mistral': 646, 'n_tokens_neox': 634, 'n_words': 88, 'path': '19BCE0436_Multilinear_Regression.ipynb', 'repo_name': 'atulragarwal/Appointy-Submission', 'size': '1235'}