0
Knn algorithm in java
How i can input 3 vectors and another vector to calculate distance and print vector with k=2
3 Answers
0
Because i need solution for my exam
0
I have no idea how i solove my problem
0
for input use
int[][] vectors = new int[numberOfVectors][2];
for (int i=0; i < numberOfVectors; i++) {
vectors[i][0] = sc.nextInt();
vectors[i][1] = sc.nextInt();
}
System.out.println( Arrays.deepToString( vectors) );
or use a Point class