Commit d444ae56 authored by Prinkey, David (S&T-Student)'s avatar Prinkey, David (S&T-Student)
Browse files

Update train_test.py

parent 2c910f93
......@@ -9,10 +9,10 @@ from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
df = pd.read_csv("forestfires.csv")
data = pd.read_csv("forestfires.csv")
x = df.drop(columns=['rain'])
y = df[['rain']]
x = data.drop(columns=['rain'])
y = data[['rain']]
x_train, x_test, y_train, y_test, = train_test_split(x, y, test_size=0.5, random_state=0)
......@@ -30,8 +30,8 @@ plt.xlabel("rain")
plt.ylabel("Freq")
plt.show()
x = df.drop(columns=['DC'])
y = df[['DC']]
x = data.drop(columns=['DC'])
y = data[['DC']]
x_train, x_test, y_train, y_test, = train_test_split(x, y, test_size=0.5, random_state=0)
......@@ -49,8 +49,8 @@ plt.xlabel("DC")
plt.ylabel("Freq")
plt.show()
x = df.drop(columns=['month'])
y = df[['month']]
x = data.drop(columns=['month'])
y = data[['month']]
x_train, x_test, y_train, y_test, = train_test_split(x, y, test_size=0.5, random_state=0)
......@@ -67,18 +67,3 @@ plt.title("Month Test")
plt.xlabel("Month")
plt.ylabel("Freq")
plt.show()
# In[ ]:
# In[ ]:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment