Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
meaningful variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
durandom committed May 28, 2019
1 parent db01c83 commit ac52237
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

def import_data_and_split():
# Import the dataset
d = pandas.read_csv('data.csv')
x = d.iloc[:, :-1].values
y = d.iloc[:, 1].values
data_set = pandas.read_csv('data.csv')
x_values = data_set.iloc[:, :-1].values
y_values = data_set.iloc[:, 1].values

# Split the dataset into the training set and test set
# We're splitting the data in 1/3, so out of 30 rows, 20 rows will go into the training set,
# and 10 rows will go into the testing set.
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size =1 / 3, random_state = 0)
x_train, x_test, y_train, y_test = train_test_split(x_values, y_values, test_size =1 / 3, random_state = 0)

return (x_train, x_test, y_train, y_test)

Expand Down

0 comments on commit ac52237

Please sign in to comment.