[ https://issues.apache.org/jira/browse/MADLIB-1323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16824373#comment-16824373 ]
Nandish Jayaram edited comment on MADLIB-1323 at 4/23/19 9:47 PM: ------------------------------------------------------------------ MLP already has the code to create these columns (albeit with the wrong column name currently). We refactored the code out to function {{create_cols_from_array_sql_string}} in {{utilities.py_in}} to generate the necessary query for creation of these columns. Fix to this JIRA mainly entails using that function and refactoring the code in MLP. Refer to https://github.com/apache/madlib/blob/master/src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in#L111 for how it is used. was (Author: njayaram): MLP already has the code to create these columns (albeit with the wrong column name currently). We refactored the code out to function {{create_cols_from_array_sql_string}} in {{utilities.py_in}} to generate the necessary query for creation of these columns. This fix to this JIRA is to use that function and refactoring the code in MLP. Refer to https://github.com/apache/madlib/blob/master/src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in#L111 for how it is used. > MLP - fix column name in output table > ------------------------------------- > > Key: MADLIB-1323 > URL: https://issues.apache.org/jira/browse/MADLIB-1323 > Project: Apache MADlib > Issue Type: Bug > Components: Module: Neural Networks > Reporter: Frank McQuillan > Priority: Minor > Fix For: v1.16 > > > http://madlib.apache.org/docs/latest/group__grp__nn.html#example > {code} > output_table > TEXT. Name of the table where output predictions are written. If this table > name is already in use, an error is returned. Table contains: > id Gives the 'id' for each prediction, corresponding to each row from the > data_table. > estimated_COL_NAME (For pred_type='response') The estimated class for > classification or value for regression, where COL_NAME is the name of the > column to be predicted from training data. > prob_CLASS > (For pred_type='prob' for classification) The probability of a given class > CLASS as given by softmax. There will be one column for each class in the > training data. > {code} > But the code outputs `estimated_prob_CLASS`, e.g. > {code} > estimated_prob_Iris_setosa | estimated_prob_Iris_versicolor > {code} > so we should fix this so it outputs `prob_CLASS`, e.g. > {code} > prob_Iris_setosa | prob_Iris_versicolor > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)