You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by GitBox <gi...@apache.org> on 2019/05/03 17:24:54 UTC
[GitHub] [madlib] hpandeycodeit commented on a change in pull request #384:
MLP - Fixed column names in the Output Table
hpandeycodeit commented on a change in pull request #384: MLP - Fixed column names in the Output Table
URL: https://github.com/apache/madlib/pull/384#discussion_r280860350
##########
File path: src/ports/postgres/modules/convex/mlp_igd.py_in
##########
@@ -1048,14 +1050,8 @@ def mlp_predict(schema_madlib, model_table, data_table, id_col_name,
else:
intermediate_col = unique_string()
if classes:
- # we cannot call sql quote_ident on the class value because
- # aliasing does not support quote_ident. Hence calling our
- # python implementation of quote_ident
- score_format = ',\n'.join([
- 'CAST({interim}[{j}] as DOUBLE PRECISION) as "{c_str}"'.
- format(j=i + 1, c_str=quote_ident("estimated_prob_{0}".
- format(str(c))).strip(' "'), interim=intermediate_col)
- for i, c in enumerate(classes)])
+ score_format = create_cols_from_array_sql_string(
+ classes, intermediate_col, 'prob', 'double precision', False, 'convex')
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services