Created
November 26, 2017 12:40
-
-
Save joao-timescale/a0bdc1913dc08a1e6ff0618db267cddd to your computer and use it in GitHub Desktop.
KNN training
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
classifier = KNearestNeighbors(k=5) | |
# Train the classifier | |
classifier.fit(train_data, train_data_labels) | |
# Obtain the predictions based on the training data | |
prediction = classifier.predict(test_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment