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, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Count: 6 -
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
Average Scores Based on Model History
- Average Accuracy: 0.87
- Average Precision: 0.88
- Average Recall: 0.87
- Average F1 Score: 0.84
KNN Model History
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Create Date: December 20, 2024, 11:03 p.m.
- Evaluation Date: December 20, 2024, 11:03 p.m.
- Popularity History Timeframe: 11/21/2024 - 12/21/2024
Performance Metrics
- Accuracy: 0.95
- Precision: 0.95
- Recall: 0.95
- F1 Score: 0.94
- Confusion Matrix: [[ 6, 6, 0], [ 0, 150, 0], [ 0, 3, 9]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Create Date: December 13, 2024, 11:03 p.m.
- Evaluation Date: December 13, 2024, 11:03 p.m.
- Popularity History Timeframe: 11/14/2024 - 12/14/2024
Performance Metrics
- Accuracy: 0.95
- Precision: 0.95
- Recall: 0.95
- F1 Score: 0.94
- Confusion Matrix: [[ 6, 6, 0], [ 0, 150, 0], [ 0, 3, 9]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Create Date: December 6, 2024, 11:03 p.m.
- Evaluation Date: December 6, 2024, 11:03 p.m.
- Popularity History Timeframe: 11/07/2024 - 12/07/2024
Performance Metrics
- Accuracy: 0.95
- Precision: 0.95
- Recall: 0.95
- F1 Score: 0.94
- Confusion Matrix: [[ 6, 6, 0], [ 0, 150, 0], [ 0, 3, 9]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Create Date: December 3, 2024, 12:09 p.m.
- Evaluation Date: December 3, 2024, 12:09 p.m.
- Popularity History Timeframe: 11/03/2024 - 12/03/2024
Performance Metrics
- Accuracy: 0.95
- Precision: 0.95
- Recall: 0.95
- F1 Score: 0.94
- Confusion Matrix: [[ 6, 6, 0], [ 0, 150, 0], [ 0, 3, 9]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Create Date: November 29, 2024, 11:09 p.m.
- Evaluation Date: November 29, 2024, 11:09 p.m.
- Popularity History Timeframe: 10/31/2024 - 11/30/2024
Performance Metrics
- Accuracy: 0.95
- Precision: 0.95
- Recall: 0.95
- F1 Score: 0.94
- Confusion Matrix: [[ 6, 6, 0], [ 0, 150, 0], [ 0, 3, 9]]
Feature Importance
- No feature importance data available.
File Downloads
General Information
- Model Type: KNN
- Parameters: algorithm: auto, leaf_size: 5, metric: euclidean, n_neighbors: 11, weights: distance
- Create Date: November 22, 2024, 11:09 p.m.
- Evaluation Date: November 22, 2024, 11:09 p.m.
- Popularity History Timeframe: 10/24/2024 - 11/23/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 19, 2024, 3:03 p.m.
- Evaluation Date: October 19, 2024, 3:03 p.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, 1:16 a.m.
- Evaluation Date: October 18, 2024, 1: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 17, 2024, 11:39 p.m.
- Evaluation Date: October 17, 2024, 11:39 p.m.
- Popularity History Timeframe: 09/18/2024 - 10/18/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 17, 2024, 11:31 p.m.
- Evaluation Date: October 17, 2024, 11:31 p.m.
- Popularity History Timeframe: 09/18/2024 - 10/18/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 17, 2024, 7:16 p.m.
- Evaluation Date: October 17, 2024, 7:16 p.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.