Github user iyerr3 commented on a diff in the pull request: https://github.com/apache/madlib/pull/295#discussion_r203811750 --- Diff: src/ports/postgres/modules/recursive_partitioning/decision_tree.py_in --- @@ -2327,6 +2328,110 @@ def _tree_error(schema_madlib, source_table, dependent_varname, plpy.execute(sql) # ------------------------------------------------------------ +def _validate_var_importance_input(model_table, summary_table, output_table): + _assert(table_exists(model_table), + "Recursive Partitioning: Model table does not exist.") + _assert(table_exists(summary_table), + "Recursive Partitioning: Model summary table does not exist.") + _assert(not table_exists(output_table), + "Recursive Partitioning: Output table already exists.") + +def _is_model_for_RF(summary_table): + # Only an RF model (and not DT) would have num_trees column in summary + return columns_exist_in_table(summary_table, ['num_trees']) --- End diff -- We've a `method_name` in summary table that makes this clearer.
---