|
|
@@ -5,7 +5,7 @@ import numpy as np
|
|
|
def main():
|
|
|
# a test of this method using an arbitrarily generated list of 5 vectors with 3 features each
|
|
|
# nearestNeighbors([[1, 1, 0], [1, 0, 0], [0, 0, 0], [0, 5, 5]], [[1, 1, 4]])
|
|
|
- kNearestNeighbors([[1, 1, 0], [1, 0, 0], [0, 0, 0], [0, 5, 5]], [1, 2, 3, 4], [[1, 1, 0], [0, 5, 5]])
|
|
|
+ kNearestNeighbors([[1, 1, 0], [1, 0, 0], [0, 0, 0], [0, 5, 5]], ["three", 2, 3, "5"], [[1, 1, 0], [0, 5, 5]])
|
|
|
|
|
|
|
|
|
def kNearestNeighbors(data: list, classifications: list, test_data: list):
|