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 2017/03/13 20:57:58 UTC
[36/50] [abbrv] incubator-madlib git commit: Release v1.10:
http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/90f4dc15/src/madpack/upgrade_util.py
----------------------------------------------------------------------
diff --git a/src/madpack/upgrade_util.py b/src/madpack/upgrade_util.py
index 67227f7..21ddd55 100644
--- a/src/madpack/upgrade_util.py
+++ b/src/madpack/upgrade_util.py
@@ -140,55 +140,16 @@ class ChangeHandler(UpgradeBase):
"""
@brief Load the configuration file
"""
- # _mad_dbrev = 1.0
- if self._mad_dbrev.split('.') < '1.1'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.0_1.9.1.yaml')
- # _mad_dbrev = 1.1
- elif self._mad_dbrev.split('.') < '1.2'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.1_1.9.1.yaml')
- # _mad_dbrev = 1.2
- elif self._mad_dbrev.split('.') < '1.3'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.2_1.9.1.yaml')
- # _mad_dbrev = 1.3
- elif self._mad_dbrev.split('.') < '1.4'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.3_1.9.1.yaml')
- # _mad_dbrev = 1.4
- elif self._mad_dbrev.split('.') < '1.4.1'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.4_1.9.1.yaml')
- # _mad_dbrev = 1.4.1
- elif self._mad_dbrev.split('.') < '1.5'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.4.1_1.9.1.yaml')
- # _mad_dbrev = 1.5
- elif self._mad_dbrev.split('.') < '1.6'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.5_1.9.1.yaml')
- # _mad_dbrev = 1.6
- elif self._mad_dbrev.split('.') < '1.6.0S'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.6_1.9.1.yaml')
- # _mad_dbrev = 1.6.0S
- elif self._mad_dbrev.split('.') < '1.7'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.6_1.9.1.yaml')
- # _mad_dbrev = 1.7
- elif self._mad_dbrev.split('.') < '1.7.1'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.7_1.9.1.yaml')
- # _mad_dbrev = 1.7.1
- elif self._mad_dbrev.split('.') < '1.8'.split('.'):
- filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.7.1_1.9.1.yaml')
+
# _mad_dbrev = 1.8
- elif self._mad_dbrev.split('.') < '1.9'.split('.'):
+ if self._mad_dbrev.split('.') < '1.9'.split('.'):
filename = os.path.join(self._maddir, 'madpack',
- 'changelist_1.8_1.9.1.yaml')
+ 'changelist_1.8_1.10.yaml')
# _mad_dbrev = 1.9
+ elif self._mad_dbrev.split('.') < '1.9.1'.split('.'):
+ filename = os.path.join(self._maddir, 'madpack',
+ 'changelist_1.9_1.10.yaml')
+ # _mad_dbrev = 1.9.1
else:
filename = os.path.join(self._maddir, 'madpack',
'changelist.yaml')
http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/90f4dc15/src/ports/postgres/modules/recursive_partitioning/test/random_forest.sql_in
----------------------------------------------------------------------
diff --git a/src/ports/postgres/modules/recursive_partitioning/test/random_forest.sql_in b/src/ports/postgres/modules/recursive_partitioning/test/random_forest.sql_in
index 743bdfe..e91c71a 100644
--- a/src/ports/postgres/modules/recursive_partitioning/test/random_forest.sql_in
+++ b/src/ports/postgres/modules/recursive_partitioning/test/random_forest.sql_in
@@ -277,7 +277,7 @@ INSERT INTO rf_gr_test (id,gr,f1,f2,f3,cl) VALUES
(5,2,5,4,1,1);
DROP TABLE IF EXISTS train_output, train_output_summary, train_output_group;
-SELECT madlib.forest_train(
+SELECT forest_train(
'rf_gr_test'::TEXT, -- source table
'train_output'::TEXT, -- output model table
'id'::TEXT, -- id column
http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/90f4dc15/src/ports/postgres/modules/svm/test/svm.sql_in
----------------------------------------------------------------------
diff --git a/src/ports/postgres/modules/svm/test/svm.sql_in b/src/ports/postgres/modules/svm/test/svm.sql_in
index 2ea711a..60d280e 100644
--- a/src/ports/postgres/modules/svm/test/svm.sql_in
+++ b/src/ports/postgres/modules/svm/test/svm.sql_in
@@ -795,7 +795,7 @@ COPY svm_unbalanced (index, x1, x2, y) FROM stdin delimiter '|';
DROP TABLE IF EXISTS svm_out, svm_out_summary;
-SELECT madlib.svm_classification(
+SELECT svm_classification(
'svm_unbalanced',
'svm_out',
'y',
@@ -807,7 +807,7 @@ SELECT madlib.svm_classification(
);
DROP TABLE IF EXISTS svm_predict_out;
-SELECT madlib.svm_predict('svm_out', 'svm_unbalanced', 'index', 'svm_predict_out');
+SELECT svm_predict('svm_out', 'svm_unbalanced', 'index', 'svm_predict_out');
-- we check if the accuracy in prediction the unbalanced class is relatively
-- good. Without the class weight, this can go as low as 50%.
http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/90f4dc15/src/ports/postgres/modules/utilities/test/encode_categorical.sql_in
----------------------------------------------------------------------
diff --git a/src/ports/postgres/modules/utilities/test/encode_categorical.sql_in b/src/ports/postgres/modules/utilities/test/encode_categorical.sql_in
index 79cfba9..5a3dd75 100644
--- a/src/ports/postgres/modules/utilities/test/encode_categorical.sql_in
+++ b/src/ports/postgres/modules/utilities/test/encode_categorical.sql_in
@@ -58,16 +58,16 @@ F|0.550|0.415|0.135|2
SELECT * FROM abalone;
-- default test
-select madlib.encode_categorical_variables('abalone', 'abalone_out1', 'sex');
+select encode_categorical_variables('abalone', 'abalone_out1', 'sex');
select * from abalone_out1;
-- ignoring numeric columns
-select madlib.encode_categorical_variables('abalone', 'abalone_out2', 'sex, length');
+select encode_categorical_variables('abalone', 'abalone_out2', 'sex, length');
select * from abalone_out2;
-- row_id showing multiple columns,
-- top and value_to_drop able to work together with unquoted column names
-select madlib.encode_categorical_variables('abalone', 'abalone_out3',
+select encode_categorical_variables('abalone', 'abalone_out3',
'sex, "Class"', 'class',
'id, sex, "Class"', '2', 'sex=M, Class=1',
true, 'column', false
@@ -75,7 +75,7 @@ select madlib.encode_categorical_variables('abalone', 'abalone_out3',
select * from abalone_out3;
-- * working, exclude working, global value_to_drop working
-select madlib.encode_categorical_variables('abalone', 'abalone_out4',
+select encode_categorical_variables('abalone', 'abalone_out4',
'*', '"Class"',
'id', '2', 'M',
true, 'column', false
@@ -84,7 +84,7 @@ select * from abalone_out4;
-- array output working with dictionary output,
-- top with percent input, global value_to_drop
-select madlib.encode_categorical_variables('abalone', 'abalone_out5',
+select encode_categorical_variables('abalone', 'abalone_out5',
'sex, "Class"', '',
'id', '0.5', 'M',
true, 'array', false
@@ -93,7 +93,7 @@ select * from abalone_out5;
select * from abalone_out5_dictionary order by index;
-- dictionary working, top with more than possible values working
-select madlib.encode_categorical_variables('abalone', 'abalone_out6',
+select encode_categorical_variables('abalone', 'abalone_out6',
'sex, "Class"', '',
'id', '3', 'class=1',
true, 'svec', true