Guest User

Untitled

a guest
Feb 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #we'll have to split our data into two, 67% of our data to train and 33% to test
  2. array = data.values
  3. X = array[:,0:8]
  4. Y = array[:,8]
  5. test_size = 0.33
  6. seed = 7
  7. #spliting the dataset
  8. X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=test_size,
  9. random_state=seed)
  10. #giving our algorith LogisticRegression a variable name
  11. model = LogisticRegression()
  12. #Training our model
  13. model.fit(X_train, Y_train)
Add Comment
Please, Sign In to add comment