Skip to content

Instantly share code, notes, and snippets.

@zoecarver
Created November 27, 2018 03:24
Show Gist options
  • Save zoecarver/d3f8079fd281b0e109ff9eff88313f02 to your computer and use it in GitHub Desktop.
Save zoecarver/d3f8079fd281b0e109ff9eff88313f02 to your computer and use it in GitHub Desktop.
X = np.vstack([people_features, not_people_features])
y = np.concatenate([np.ones(people_len), np.zeros(not_people_len)])
train_x, test_x, train_y, test_y = train_test_split(X, y, test_size=0.2, shuffle=True)
classifier = LinearSVC(verbose=1)
classifier.fit(train_x, train_y)
print('Accuracy: %s' % classifier.score(test_x, test_y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment