GitHub user auonhaidar opened a pull request:

    https://github.com/apache/incubator-madlib/pull/80

    KNN Added

    I have added implementation of K-Nearest Neighbours. The function takes 
following arguments in order:
    _training table name
    training table's column name having vectors
    training table's column name having target values(labels): assumed float
    testing table name
    testing table's column name having vectors
    testing table's column name having row ids (used for final result's table 
creation)
    Operation ('c' for classification, 'r' for regression)
    K_
    
    
    **sample run:** 
    select * from 
madlib.knn('training_knn','points','label','testing_knn','points','pid','c',3);
    
    **Output gets saved in knn_final table as:**
    
    _pid, points, predicted_target_value_
    
    
    Nearest neighbours are calculated using madlib's _squared norm_ metric.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/auonhaidar/incubator-madlib master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-madlib/pull/80.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #80
    
----
commit 23b418cf9155aa74d388d67fcec184902570869c
Author: auonhaidar <[email protected]>
Date:   2016-12-13T02:09:12Z

    KNN Added

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to