You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by ri...@apache.org on 2016/02/29 19:54:32 UTC

incubator-madlib git commit: Decision Tree: Fix format specifier in online help

Repository: incubator-madlib
Updated Branches:
  refs/heads/master 0341f47bc -> 7273dcaff


Decision Tree: Fix format specifier in online help

Jira: MADLIB-968

Using tree_train('example') returned a tuple index error, due to invalid
format specifier. This fix adds extra { and } to escape existing {} in the
Python string.

Closes #25


Project: http://git-wip-us.apache.org/repos/asf/incubator-madlib/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-madlib/commit/7273dcaf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-madlib/tree/7273dcaf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-madlib/diff/7273dcaf

Branch: refs/heads/master
Commit: 7273dcaff77dad9e7834e93024986c0516cf8641
Parents: 0341f47
Author: Nandish Jayaram <nj...@pivotal.io>
Authored: Thu Feb 25 16:05:55 2016 -0800
Committer: Rahul Iyer <ri...@pivotal.io>
Committed: Mon Feb 29 10:54:11 2016 -0800

----------------------------------------------------------------------
 .../recursive_partitioning/decision_tree.py_in  | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/7273dcaf/src/ports/postgres/modules/recursive_partitioning/decision_tree.py_in
----------------------------------------------------------------------
diff --git a/src/ports/postgres/modules/recursive_partitioning/decision_tree.py_in b/src/ports/postgres/modules/recursive_partitioning/decision_tree.py_in
index 4d15e43..805823c 100644
--- a/src/ports/postgres/modules/recursive_partitioning/decision_tree.py_in
+++ b/src/ports/postgres/modules/recursive_partitioning/decision_tree.py_in
@@ -295,17 +295,17 @@ CREATE TABLE dummy_dt_con_src (
 );
 
 INSERT INTO dummy_dt_src VALUES
-(1, '{0}'::INTEGER[], ARRAY[0], 0.5),
-(2, '{0}'::INTEGER[], ARRAY[1], 0.5),
-(3, '{0}'::INTEGER[], ARRAY[4], 0.5),
-(4, '{0}'::INTEGER[], ARRAY[4], 0.5),
-(5, '{0}'::INTEGER[], ARRAY[4], 0.5),
-(6, '{0}'::INTEGER[], ARRAY[5], 0.1),
-(7, '{0}'::INTEGER[], ARRAY[6], 0.1),
-(8, '{1}'::INTEGER[], ARRAY[9], 0.1);
-(9, '{1}'::INTEGER[], ARRAY[9], 0.1);
-(10, '{1}'::INTEGER[], ARRAY[9], 0.1);
-(11, '{1}'::INTEGER[], ARRAY[9], 0.1);
+(1, '{{0}}'::INTEGER[], ARRAY[0], 0.5),
+(2, '{{0}}'::INTEGER[], ARRAY[1], 0.5),
+(3, '{{0}}'::INTEGER[], ARRAY[4], 0.5),
+(4, '{{0}}'::INTEGER[], ARRAY[4], 0.5),
+(5, '{{0}}'::INTEGER[], ARRAY[4], 0.5),
+(6, '{{0}}'::INTEGER[], ARRAY[5], 0.1),
+(7, '{{0}}'::INTEGER[], ARRAY[6], 0.1),
+(8, '{{1}}'::INTEGER[], ARRAY[9], 0.1);
+(9, '{{1}}'::INTEGER[], ARRAY[9], 0.1);
+(10, '{{1}}'::INTEGER[], ARRAY[9], 0.1);
+(11, '{{1}}'::INTEGER[], ARRAY[9], 0.1);
 
 DROP TABLE IF EXISTS tree_out, tree_out_summary;
 SELECT madlib.tree_train(