mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 18:38:39 +00:00
Merge pull request #3 from thor-harsh/thor-harsh-patch-3
Update k_nearest_neighbours.py
This commit is contained in:
commit
1465083be0
@ -10,7 +10,8 @@ X = np.array(data["data"])
|
||||
y = np.array(data["target"])
|
||||
classes = data["target_names"]
|
||||
|
||||
X_train, X_test, y_train, y_test = train_test_split(X, y)
|
||||
X_train, X_test, y_train, y_test = train_test_split(X, ym,random_state=42)
|
||||
'''Random state = 42 is set so that the training and test set remains same after 1st run for all
|
||||
|
||||
|
||||
def euclidean_distance(a, b):
|
||||
|
Loading…
x
Reference in New Issue
Block a user