Merge pull request #3 from thor-harsh/thor-harsh-patch-3

Update k_nearest_neighbours.py
This commit is contained in:
thor-harsh 2023-08-19 18:50:30 +05:30 committed by GitHub
commit 1465083be0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):