Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -85,6 +85,8 @@ def KNN_predict(train_features, train_labels, test_feature, K):
|
|
| 85 |
### (1) calculate distance between test feature and each of training data points
|
| 86 |
|
| 87 |
# get distance for data point i
|
|
|
|
|
|
|
| 88 |
dis = scipy.spatial.distance.euclidean(train_point_feature, test_point_feature)
|
| 89 |
|
| 90 |
# collect lable for datapoint i
|
|
|
|
| 85 |
### (1) calculate distance between test feature and each of training data points
|
| 86 |
|
| 87 |
# get distance for data point i
|
| 88 |
+
print("train_point_feature: ",train_point_feature.shape)
|
| 89 |
+
print("test_point_feature: ",test_point_feature.shape)
|
| 90 |
dis = scipy.spatial.distance.euclidean(train_point_feature, test_point_feature)
|
| 91 |
|
| 92 |
# collect lable for datapoint i
|