Skip to content

Commit d1b28e2

Browse files
committed
image location specified
1 parent 7ea9827 commit d1b28e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dsa-solutions/gfg-solutions/0025-K-Nearest Neighbor.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: K-Nearest-Neighbor
33
title: K-Nearest Neighbor (Geeks for Geeks)
4-
sidebar_label: Problems - K-Nearest Neighbor
4+
sidebar_label: 0025 K-Nearest Neighbor
55
tags:
66
- Intermediate
77
- Machine Learning
@@ -19,7 +19,7 @@ KNN is one of the most basic yet essential classification algorithms in machine
1919

2020
It is widely disposable in real-life scenarios since it is non-parametric, meaning it does not make any underlying assumptions about the distribution of data (as opposed to other algorithms such as GMM, which assume a Gaussian distribution of the given data). We are given some prior data (also called training data), which classifies coordinates into groups identified by an attribute.
2121

22-
![This image explains the Basic](/assets/knnclassifier.png)
22+
![This image explains the Basic](../../assets/knnclassifier.png)
2323

2424
## Intuition Behind KNN Algorithm
2525

@@ -37,7 +37,7 @@ The value of K is critical in the K-NN algorithm. A small K can make the model s
3737
K-Nearest Neighbor (K-NN) is a simple, supervised machine learning algorithm used for classification and regression tasks. It works by finding the K closest data points (neighbors) to the query point and using them to make predictions. For classification, it assigns the class most common among the neighbors. For regression, it averages the values of the neighbors.
3838

3939

40-
![Here you can see](/assets/kthNearest.png)
40+
![Here you can see](../../assets/kthNearest.png)
4141

4242
## Problem Description
4343

@@ -65,7 +65,7 @@ Output: [(1, 2), (2, 3), (3, 4)]
6565

6666
## Your Task
6767

68-
Implement the function `knn()` that takes in a dataset, a query point, and an integer k. The function should return the k points in the dataset that are closest to the query point based on Euclidean distance.
68+
Implement the function $knn()$ that takes in a dataset, a query point, and an integer k. The function should return the k points in the dataset that are closest to the query point based on Euclidean distance.
6969

7070
Expected Time Complexity: $O(n log n)$ for sorting the dataset.
7171

0 commit comments

Comments
 (0)