Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def homework01_solution1(K, X1, X2):
|
|
36 |
#print(idx, fea, dist, label)
|
37 |
|
38 |
# Dictionary to append
|
39 |
-
new_data = {'Rank of closest neighbor':
|
40 |
tmp = pd.DataFrame(new_data, index=[0])
|
41 |
# Append dictionary to DataFrame
|
42 |
#data = data.append(new_data, ignore_index=True)
|
|
|
36 |
#print(idx, fea, dist, label)
|
37 |
|
38 |
# Dictionary to append
|
39 |
+
new_data = {'Rank of closest neighbor': i, 'Features (X_1,X_2)': fea, 'Label (Y)':label , 'Distance to query data': dist}
|
40 |
tmp = pd.DataFrame(new_data, index=[0])
|
41 |
# Append dictionary to DataFrame
|
42 |
#data = data.append(new_data, ignore_index=True)
|