Github user kaknikhil commented on a diff in the pull request: https://github.com/apache/madlib/pull/250#discussion_r177913869 --- Diff: src/ports/postgres/modules/convex/mlp_igd.py_in --- @@ -856,8 +868,16 @@ def mlp_predict(schema_madlib, model_table, data_table, id_col_name, activation = _get_activation_index(summary['activation']) layer_sizes = PY2SQL( summary['layer_sizes'], array_type="DOUBLE PRECISION") - is_classification = int(summary["is_classification"]) is_response = int(pred_type == 'response') + is_classification = int(summary["is_classification"]) + classes = summary['classes'] + # Set a flag to indicate that it is a classification model, with an array + # as the dependent var. The only scenario where classification allows for + # an array dep var is when the user has provided a one-hot encoded dep var + # during training, and mlp_classification does not one-hot encode + # (and hence classes column in model's summary table is NULL). + array_dep_var_for_classification = int(is_classification and not classes) --- End diff -- can we change the name of `array_dep_var_for_classification` to something like`is_dep_var_an_array` so that it's clear that it's a flag.
---