What is KNN?
K-Nearest Neighbors (KNN) is a simple, non-parametric, and supervised machine learning algorithm used for classification and regression tasks. The algorithm operates on the principle that similar data points are located close to each other in the feature space. To classify a new data point, KNN identifies the 'K' nearest neighbors based on a distance metric, typically Euclidean distance, and assigns the class that is most common among those neighbors. The value of 'K' is a crucial hyperparameter that can significantly affect the model's performance; a smaller 'K' can lead to overfitting, while a larger 'K' may smooth out class boundaries. KNN is particularly useful in scenarios where the decision boundary is not linear and when the dataset is relatively small and easy to manage.
Most Frequent Parameters
-
algorithm: auto, n_neighbors: 9, weights: uniform
- Count: 2 -
algorithm: auto, n_neighbors: 9, weights: distance
- Count: 1 -
algorithm: auto, leaf_size: 5, metric: manhattan, n_neighbors: 15, weights: distance
- Count: 1 -
algorithm: auto, leaf_size: 5, metric: manhattan, n_neighbors: 21, weights: distance
- Count: 1 -
algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Count: 1
Average Scores Based on Model History
- Average Accuracy: 0.80
- Average Precision: 0.82
- Average Recall: 0.80
- Average F1 Score: 0.76
KNN Model History
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Create Date: November 23, 2024, 9:09 a.m.
- Evaluation Date: November 23, 2024, 9:09 a.m.
- Popularity History Timeframe: 10/23/2024 - 11/22/2024
Performance Metrics
- Accuracy: 0.94
- Precision: 0.90
- Recall: 0.94
- F1 Score: 0.91
- Confusion Matrix: [[ 0, 7, 0], [ 0, 156, 0], [ 0, 4, 5]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: manhattan, n_neighbors: 21, weights: distance
- Create Date: October 20, 2024, 12:03 a.m.
- Evaluation Date: October 20, 2024, 12:03 a.m.
- Popularity History Timeframe: 09/19/2024 - 10/19/2024
Performance Metrics
- Accuracy: 0.81
- Precision: 0.81
- Recall: 0.81
- F1 Score: 0.80
- Confusion Matrix: [[29, 20, 0], [ 6, 94, 0], [ 1, 4, 6]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: manhattan, n_neighbors: 15, weights: distance
- Create Date: October 18, 2024, 10:16 a.m.
- Evaluation Date: October 18, 2024, 10:16 a.m.
- Popularity History Timeframe: 09/18/2024 - 10/18/2024
Performance Metrics
- Accuracy: 0.73
- Precision: 0.76
- Recall: 0.73
- F1 Score: 0.67
- Confusion Matrix: [[100, 2, 0], [ 32, 9, 0], [ 10, 0, 7]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, n_neighbors: 9, weights: distance
- Create Date: October 18, 2024, 8:39 a.m.
- Evaluation Date: October 18, 2024, 8:39 a.m.
- Popularity History Timeframe: 09/17/2024 - 10/17/2024
Performance Metrics
- Accuracy: 0.73
- Precision: 0.75
- Recall: 0.73
- F1 Score: 0.67
- Confusion Matrix: [[100, 2, 0], [ 33, 7, 1], [ 8, 0, 9]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, n_neighbors: 9, weights: uniform
- Create Date: October 18, 2024, 8:31 a.m.
- Evaluation Date: October 18, 2024, 8:31 a.m.
- Popularity History Timeframe: 09/17/2024 - 10/17/2024
Performance Metrics
- Accuracy: 0.80
- Precision: 0.84
- Recall: 0.80
- F1 Score: 0.75
- Confusion Matrix: [[115, 0, 0], [ 19, 3, 0], [ 13, 0, 10]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, n_neighbors: 9, weights: uniform
- Create Date: October 18, 2024, 4:16 a.m.
- Evaluation Date: October 18, 2024, 4:16 a.m.
- Popularity History Timeframe: 09/17/2024 - 10/17/2024
Performance Metrics
- Accuracy: 0.80
- Precision: 0.84
- Recall: 0.80
- F1 Score: 0.75
- Confusion Matrix: [[115, 0, 0], [ 19, 3, 0], [ 13, 0, 10]]
Feature Importance
- No feature importance data available.