I am trying to calculate the distance of each point in the testing set from each point in the training set:
This is what my loop looks like right now:
for x in testingSet for y in trainingSet print numpy.linalg.norm(x-y)
Where testingSet and trainingSet are numpy arrays where each row of the two sets hold the feature data for one example.
However, it's running extremely slowly, taking more than 10 minutes since my data set is bigger (testing set of 3000, training set of ~10,000). Does this have to do with my method or am I utilizing numPY incorrectly?