Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
import numpy as np
|
| 3 |
+
import matplotlib.pyplot as plt
|
| 4 |
+
import seaborn as sns
|
| 5 |
+
|
| 6 |
+
df = pd.read_csv('/content/drive/MyDrive/Artificial Intelligence/Colab Notebooks/Data/SAT GPA.csv')
|
| 7 |
+
|
| 8 |
+
from sklearn.model_selection import train_test_split
|
| 9 |
+
|
| 10 |
+
X = df.drop(['*GPA (4.0 Scale)*'], axis=1)
|
| 11 |
+
y = df['*GPA (4.0 Scale)*']
|
| 12 |
+
|
| 13 |
+
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
|
| 14 |
+
|
| 15 |
+
from sklearn.linear_model import LinearRegression
|
| 16 |
+
|
| 17 |
+
model = LinearRegression()
|
| 18 |
+
model.fit(X_train, y_train)
|
| 19 |
+
|
| 20 |
+
model.predict([[1600]])
|