Skip to content

Classification algorithm based on majority vote of k-nearest neighbors

Notifications You must be signed in to change notification settings

Mithradatha/k-nn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K-Nearest Neighbors classification algorithm

Algorithm

Distance Euclidean

Classifier Majority Vote | Weighted Distance

Feature Normalization None

Dimension Reduction None

Cross-Validation None

Assumptions

  • File format csv
  • Input data shuffled
  • Number of features < 10
  • Feature units scaled
  • Attribute datatype real
  • Missing values false
  • Headers false

Configuration

{
    "input": <path: string>,
    "exclude": <columns: integer[]>,
    "class": <column: integer>,
    "neighbors": <count: integer>,
    "skewed": <true/false: boolean>,
    "sample": <size: integer>,
    "test": <percentage: float>
}

Example

{
    "input": "../petals.csv",
    "exclude": [],
    "class": 4,
    "neighbors": 3,
    "skewed": false,
    "sample": 150,
    "test": 0.3
}

About

Classification algorithm based on majority vote of k-nearest neighbors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages