Github user njayaram2 commented on a diff in the pull request:
https://github.com/apache/madlib/pull/250#discussion_r178168389
--- 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 --
Will change it to `is_dep_var_an_array_for_classification`
---