<jupyter_start><jupyter_text>Multiple Linear Regression   Importing Libraries<jupyter_code>import numpy as np
import matplotlib.pyplot as plt 
import pandas as pd<jupyter_output><empty_output><jupyter_text>Importing the dataset<jupyter_code>data = pd.read_csv('wine.csv')
X = data.iloc[:, :-1].values
y = data.iloc[:, -1].values
data<jupyter_output><empty_output><jupyter_text>Exploring data<jupyter_code>print('mean quality:', data['quality'].mean()) 
print('max quality:', data['quality'].max())
print('min quality:', data['quality'].min())<jupyter_output>mean quality: 5.6360225140712945
max quality: 8
min quality: 3<jupyter_text>Conclusions:     The max quality wine on the dataset has a 8 grade quality      The worst quality wine on the dataset has a 3 grade quality       Mean Quality 5.63        Splitting dataset into the Training set and Test set<jupyter_code>from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X ,y, test_size = 0.2, random_state = 0)<jupyter_output><empty_output><jupyter_text>Training the Multiple Linear Regression Model on the Training set<jupyter_code>from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
print(np.concatenate((y_pred.reshape(len(y_pred),1), y_test.reshape(len(y_test),1)),1))<jupyter_output>[[5.78 6.  ]
 [5.04 5.  ]
 [6.6  7.  ]
 [5.34 6.  ]
 [5.94 5.  ]
 [5.01 6.  ]
 [5.4  5.  ]
 [6.05 6.  ]
 [4.87 4.  ]
 [4.95 5.  ]
 [5.29 5.  ]
 [5.41 5.  ]
 [5.71 6.  ]
 [5.13 5.  ]
 [5.53 6.  ]
 [6.38 6.  ]
 [6.81 7.  ]
 [5.74 5.  ]
 [5.98 5.  ]
 [5.09 4.  ]
 [6.34 7.  ]
 [5.16 6.  ]
 [5.64 6.  ]
 [6.15 4.  ]
 [5.48 6.  ]
 [5.03 5.  ]
 [5.19 5.  ]
 [6.49 7.  ]
 [5.33 5.  ]
 [6.3  6.  ]
 [6.03 5.  ]
 [5.83 6.  ]
 [5.59 5.  ]
 [5.29 6.  ]
 [5.76 7.  ]
 [6.15 7.  ]
 [5.14 5.  ]
 [5.48 6.  ]
 [6.39 6.  ]
 [5.79 7.  ]
 [5.43 5.  ]
 [6.05 7.  ]
 [6.7  6.  ]
 [6.6  6.  ]
 [5.97 5.  ]
 [4.79 5.  ]
 [5.5  6.  ]
 [6.02 6.  ]
 [5.49 6.  ]
 [6.11 5.  ]
 [5.31 5.  ]
 [5.28 5.  ]
 [5.76 6.  ]
 [6.36 6.  ]
 [5.72 6.  ]
 [5.27 5.  ]
 [5.08 5.  ]
 [5.31 5.  ]
 [6.51 6.  ]
 [5.44 5.  ]
 [5.16 5.  ]
 [5.76 6.  ]
 [6.07 6.  ]
 [6.29 6.  ]
 [5.07 5.  ]
 [6.12 6.  ]
 [5.36 5.  ]
 [6.01 5.  ]
 [6.12 6.  ]
 [5.99 6.  ]
 [5.35 6.  ]
 [5.44 6.  ]
 [5.06 4.  ]
 [5.59 6.  ]
 [5.63 5.  ]
 [6.26 6.  ]
 [5.38 5.  ][...]
{'fraction_non_alphanumeric': 0.19639110365086027, 'fraction_numerical': 0.14015946286193873, 'mean_word_length': 2.338935574229692, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '306111', 'license': 'MIT', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1167, 'n_words': 265, 'path': 'multiple_linear.ipynb', 'repo_name': 'davi-miquelim/wine_quality_prediction', 'size': '2383'}