[
https://issues.apache.org/jira/browse/MADLIB-1129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16208498#comment-16208498
]
Frank McQuillan commented on MADLIB-1129:
-----------------------------------------
Also, I don't think the optional params are working properly. If I leave them
out
{code}
DROP TABLE IF EXISTS madlib_knn_result_list_neighbors;
SELECT * FROM madlib.knn(
'knn_train_data_reg', -- Table of training data
'data', -- Col name of training data
'id', -- Col Name of id in train data
NULL, -- NULL training labels means just list
neighbors
'knn_test_data', -- Table of test data
'data', -- Col name of test data
'id', -- Col name of id in test data
'madlib_knn_result_list_neighbors' -- Output table
);
SELECT * FROM madlib_knn_result_list_neighbors ORDER BY id;
{code}
I get an error:
{code}
Done.
(psycopg2.ProgrammingError) function madlib.knn(unknown, unknown, unknown,
unknown, unknown, unknown, unknown, unknown) does not exist
LINE 1: SELECT * FROM madlib.knn(
^
HINT: No function matches the given name and argument types. You may need to
add explicit type casts.
[SQL: "SELECT * FROM madlib.knn( \n 'knn_train_data_reg', --
Table of training data\n 'data', -- Col name of
training data\n 'id', -- Col Name of id in
train data \n NULL, -- NULL training labels
means just list neighbors\n 'knn_test_data', -- Table of
test data\n 'data', -- Col name of test data\n
'id', -- Col name of id in test data \n
'madlib_knn_result_list_neighbors' -- Output table\n );"]
{code}
> Additional output information for k-NN
> --------------------------------------
>
> Key: MADLIB-1129
> URL: https://issues.apache.org/jira/browse/MADLIB-1129
> Project: Apache MADlib
> Issue Type: Improvement
> Components: k-NN
> Reporter: Frank McQuillan
> Assignee: Himanshu Pandey
> Priority: Minor
> Labels: starter
> Fix For: v1.13
>
>
> Follow on to
> https://issues.apache.org/jira/browse/MADLIB-927
> List the k-nearest neighbors that were used in the voting/averaging, sorted
> in ASC order according to the distance function used. This could be added to
> the current output table.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)