Metadata-Version: 2.1
Name: basic-knn
Version: 0.0.2
Summary: K-Nearest Neighbors algorithm for classification problems.
Home-page: https://github.com/Egesabanci/basic_knn
Author: Ege Sabancı
Author-email: egesabanci@outlook.com.tr
License: UNKNOWN
Download-URL: https://pypi.org/project/basic_knn
Description: # KNN Algorithm Module
        
        ### What is KNN?
        In k-NN classification, the output is a class membership. An object is classified by a plurality vote of its neighbors, with the object being assigned to the class most common among its k nearest neighbors (k is a positive integer, typically small). If k = 1, then the object is simply assigned to the class of that single nearest neighbor.
        
        k-NN is a type of instance-based learning, or lazy learning, where the function is only approximated locally and all computation is deferred until function evaluation. Since this algorithm relies on distance for classification, normalizing the training data can improve its accuracy dramatically. 
        
        (Wikipedia Article about KNN, https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm)
        
        ### How to Install?
        It is always better to use "pip" (Package manager for Python).
        ```
        pip install basic_knn
        ```
        
        ### Sample Usage
        
        #### Create Model
        ```
        # import knn classifier
        from basic_knn import KNNClassifier
        
        # sample data
        data_x = [...]
        data_y = [...]
        labels = [...]
        
        # create model
        model = KNNClassifier(xs = xs, ys = ys, labels = labels)
        ```
        
        #### Make Predictions
        ```
        # sample input for predictions
        sample_input = (..., ...)
        
        # make prediction
        model.predict(sample_input)
        ```
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
