ankitajain commited on
Commit
3272bb6
1 Parent(s): 27679b6
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -24,10 +24,13 @@ x_train = X[:ntrain]
24
  y_train = y[:ntrain]
25
  x_test = X[ntrain:]
26
  y_test = y[ntrain:]
 
27
  if(option=='L1(Manhattan)'):
28
  metric= 'manhattan'
29
  else:
30
  metric= 'euclidean'
 
 
31
  knn = KNeighborsRegressor(n_neighbors=K, metric= metric)
32
  knn.fit(x_train, y_train)
33
  plt.figure()
 
24
  y_train = y[:ntrain]
25
  x_test = X[ntrain:]
26
  y_test = y[ntrain:]
27
+
28
  if(option=='L1(Manhattan)'):
29
  metric= 'manhattan'
30
  else:
31
  metric= 'euclidean'
32
+
33
+ st.write("You selected", option)
34
  knn = KNeighborsRegressor(n_neighbors=K, metric= metric)
35
  knn.fit(x_train, y_train)
36
  plt.figure()