Github user iyerr3 commented on a diff in the pull request:
https://github.com/apache/madlib/pull/289#discussion_r201493117
--- Diff:
src/ports/postgres/modules/recursive_partitioning/random_forest.py_in ---
@@ -1333,42 +1368,69 @@ def _create_group_table(
# -------------------------------------------------------------------------
-def _create_empty_result_table(schema_madlib, output_table_name):
+def _create_empty_result_table(schema_madlib, output_table_name,
importance):
"""Create the result table for all trees in the forest"""
+ impurity_var_imp_str = """, impurity_var_importance double
precision[]);""" if importance else ");"
--- End diff --
Do we need the triple quotes? Also if `);` is common in both cases then we
can move that to the query directly?
---