You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ba...@apache.org on 2021/06/03 11:34:38 UTC

[systemds] branch master updated (7778fe1 -> 97523dd)

This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git.


    from 7778fe1  [SYSTEMDS-2984] Fix matrix/frame cleanup w/ nested lists
     new bfc58f1  [SYSTEMDS-2828] Python Multi Return Continuation
     new 6b885a0  [SYSTEMDS-2828] Python Multi Return Integration
     new dbcce57  [SYSTEMDS-3005] Python Multi Return in AutoGenerator
     new 97523dd  [SYSTEMDS-3006] Python AutoGenerator methods with types

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/python/generator/generator.py             | 156 +++++++++++----------
 .../resources/template_python_script_imports       |   3 +-
 .../python/generator/resources/type_mapping.json   |   4 +-
 .../python/systemds/context/systemds_context.py    |   7 +-
 src/main/python/systemds/operator/__init__.py      |   5 +-
 .../python/systemds/operator/algorithm/__init__.py |  12 +-
 .../systemds/operator/algorithm/builtin/abstain.py |  17 ++-
 .../systemds/operator/algorithm/builtin/als.py     |  19 ++-
 .../systemds/operator/algorithm/builtin/alsCG.py   |  19 ++-
 .../systemds/operator/algorithm/builtin/alsDS.py   |  19 ++-
 .../operator/algorithm/builtin/alsPredict.py       |  17 ++-
 .../operator/algorithm/builtin/alsTopkPredict.py   |  22 ++-
 .../systemds/operator/algorithm/builtin/arima.py   |  15 +-
 .../systemds/operator/algorithm/builtin/bandit.py  |  29 +++-
 .../systemds/operator/algorithm/builtin/bivar.py   |  27 +++-
 .../operator/algorithm/builtin/components.py       |  15 +-
 .../operator/algorithm/builtin/confusionMatrix.py  |  19 ++-
 .../systemds/operator/algorithm/builtin/cor.py     |  14 +-
 .../systemds/operator/algorithm/builtin/cox.py     |  30 +++-
 .../systemds/operator/algorithm/builtin/cspline.py |  21 ++-
 .../operator/algorithm/builtin/csplineDS.py        |  20 ++-
 .../systemds/operator/algorithm/builtin/cvlm.py    |  21 ++-
 .../systemds/operator/algorithm/builtin/dbscan.py  |  15 +-
 .../operator/algorithm/builtin/decisionTree.py     |  18 ++-
 .../operator/algorithm/builtin/discoverFD.py       |  16 ++-
 .../systemds/operator/algorithm/builtin/dist.py    |  14 +-
 .../builtin/{lasso.py => executePipeline.py}       |  25 ++--
 .../algorithm/builtin/gaussianClassifier.py        |  24 +++-
 .../operator/algorithm/builtin/getAccuracy.py      |  16 ++-
 .../systemds/operator/algorithm/builtin/glm.py     |  16 ++-
 .../systemds/operator/algorithm/builtin/gmm.py     |  30 +++-
 .../operator/algorithm/builtin/gmmPredict.py       |  22 ++-
 .../systemds/operator/algorithm/builtin/gnmf.py    |  20 ++-
 .../operator/algorithm/builtin/hyperband.py        |  24 +++-
 .../operator/algorithm/builtin/img_brightness.py   |  16 ++-
 .../operator/algorithm/builtin/img_crop.py         |  18 ++-
 .../algorithm/builtin/{bandit.py => img_cutout.py} |  30 ++--
 .../builtin/{tomeklink.py => img_invert.py}        |  21 +--
 .../operator/algorithm/builtin/img_mirror.py       |  15 +-
 .../builtin/{tomeklink.py => img_posterize.py}     |  22 +--
 .../builtin/{confusionMatrix.py => img_rotate.py}  |  25 ++--
 .../builtin/{lasso.py => img_sample_pairing.py}    |  29 ++--
 .../algorithm/builtin/{bivar.py => img_shear.py}   |  26 ++--
 .../{alsTopkPredict.py => img_transform.py}        |  38 +++--
 .../algorithm/builtin/{als.py => img_translate.py} |  39 +++---
 .../operator/algorithm/builtin/imputeByFD.py       |  18 ++-
 .../operator/algorithm/builtin/imputeByMean.py     |  15 +-
 .../operator/algorithm/builtin/imputeByMedian.py   |  15 +-
 .../operator/algorithm/builtin/imputeByMode.py     |  14 +-
 .../operator/algorithm/builtin/intersect.py        |  15 +-
 .../systemds/operator/algorithm/builtin/km.py      |  26 +++-
 .../systemds/operator/algorithm/builtin/kmeans.py  |  19 ++-
 .../operator/algorithm/builtin/kmeansPredict.py    |  15 +-
 .../systemds/operator/algorithm/builtin/knnbf.py   |  16 ++-
 .../systemds/operator/algorithm/builtin/l2svm.py   |  16 ++-
 .../operator/algorithm/builtin/l2svmPredict.py     |  20 ++-
 .../systemds/operator/algorithm/builtin/lasso.py   |  16 ++-
 .../systemds/operator/algorithm/builtin/lm.py      |  16 ++-
 .../systemds/operator/algorithm/builtin/lmCG.py    |  16 ++-
 .../systemds/operator/algorithm/builtin/lmDS.py    |  16 ++-
 .../operator/algorithm/builtin/lmPredict.py        |  17 ++-
 .../operator/algorithm/builtin/logSumExp.py        |  15 +-
 .../systemds/operator/algorithm/builtin/msvm.py    |  16 ++-
 .../operator/algorithm/builtin/msvmPredict.py      |  19 ++-
 .../operator/algorithm/builtin/multiLogReg.py      |  16 ++-
 .../algorithm/builtin/multiLogRegPredict.py        |  23 ++-
 .../systemds/operator/algorithm/builtin/na_locf.py |  15 +-
 .../operator/algorithm/builtin/naiveBayes.py       |  22 ++-
 .../algorithm/builtin/naiveBayesPredict.py         |  20 ++-
 .../operator/algorithm/builtin/normalize.py        |  14 +-
 .../systemds/operator/algorithm/builtin/outlier.py |  15 +-
 .../operator/algorithm/builtin/outlierByArima.py   |  15 +-
 .../operator/algorithm/builtin/outlierByIQR.py     |  17 ++-
 .../operator/algorithm/builtin/outlierBySd.py      |  16 ++-
 .../systemds/operator/algorithm/builtin/pca.py     |  23 ++-
 .../systemds/operator/algorithm/builtin/pnmf.py    |  20 ++-
 .../systemds/operator/algorithm/builtin/ppca.py    |  19 ++-
 .../operator/algorithm/builtin/randomForest.py     |  25 +++-
 .../systemds/operator/algorithm/builtin/scale.py   |  22 ++-
 .../operator/algorithm/builtin/scaleApply.py       |  16 ++-
 .../operator/algorithm/builtin/sherlock.py         |  75 +++++++++-
 .../operator/algorithm/builtin/sherlockPredict.py  |  44 +++++-
 .../systemds/operator/algorithm/builtin/sigmoid.py |  14 +-
 .../operator/algorithm/builtin/slicefinder.py      |  22 ++-
 .../systemds/operator/algorithm/builtin/smote.py   |  16 ++-
 .../systemds/operator/algorithm/builtin/split.py   |  24 +++-
 .../operator/algorithm/builtin/splitBalanced.py    |  25 +++-
 .../operator/algorithm/builtin/stableMarriage.py   |  16 ++-
 .../systemds/operator/algorithm/builtin/statsNA.py |  15 +-
 .../systemds/operator/algorithm/builtin/steplm.py  |  20 ++-
 .../operator/algorithm/builtin/toOneHot.py         |  15 +-
 .../operator/algorithm/builtin/tomeklink.py        |  21 ++-
 .../systemds/operator/algorithm/builtin/univar.py  |  15 +-
 .../operator/algorithm/builtin/vectorToCsv.py      |  14 +-
 .../operator/algorithm/builtin/winsorize.py        |  15 +-
 .../systemds/operator/algorithm/builtin/xdummy1.py |  14 +-
 .../systemds/operator/algorithm/builtin/xdummy2.py |  18 ++-
 src/main/python/systemds/operator/nodes/frame.py   |  34 +++--
 src/main/python/systemds/operator/nodes/list.py    |  86 ++++++++++++
 .../python/systemds/operator/nodes/list_access.py  |  63 +++++++++
 src/main/python/systemds/operator/nodes/matrix.py  |  38 +++--
 .../python/systemds/operator/nodes/multi_return.py |  85 +++++++++++
 src/main/python/systemds/operator/nodes/scalar.py  |  20 ++-
 src/main/python/systemds/operator/nodes/source.py  |   9 +-
 .../python/systemds/operator/operation_node.py     | 133 +++---------------
 src/main/python/systemds/script_building/dag.py    |  43 +++++-
 src/main/python/systemds/script_building/script.py |  56 +++++---
 src/main/python/tests/algorithms/test_pca.py       |   5 +-
 .../python/tests/frame/test_transform_encode.py    |  16 +++
 src/main/python/tests/{source => list}/__init__.py |   0
 .../main/python/tests/list/return_list.dml         |  11 +-
 .../test_l2svm.py => list/test_list.py}            |  52 ++++---
 .../test_reverse.py => list/test_list_unknown.py}  |  37 +++--
 .../python/tests/source/test_source_neural_net.py  |  17 ++-
 114 files changed, 1806 insertions(+), 930 deletions(-)
 copy src/main/python/systemds/operator/algorithm/builtin/{lasso.py => executePipeline.py} (65%)
 copy src/main/python/systemds/operator/algorithm/builtin/{bandit.py => img_cutout.py} (52%)
 copy src/main/python/systemds/operator/algorithm/builtin/{tomeklink.py => img_invert.py} (71%)
 copy src/main/python/systemds/operator/algorithm/builtin/{tomeklink.py => img_posterize.py} (69%)
 copy src/main/python/systemds/operator/algorithm/builtin/{confusionMatrix.py => img_rotate.py} (61%)
 copy src/main/python/systemds/operator/algorithm/builtin/{lasso.py => img_sample_pairing.py} (64%)
 copy src/main/python/systemds/operator/algorithm/builtin/{bivar.py => img_shear.py} (58%)
 copy src/main/python/systemds/operator/algorithm/builtin/{alsTopkPredict.py => img_transform.py} (51%)
 copy src/main/python/systemds/operator/algorithm/builtin/{als.py => img_translate.py} (52%)
 create mode 100644 src/main/python/systemds/operator/nodes/list.py
 create mode 100644 src/main/python/systemds/operator/nodes/list_access.py
 create mode 100644 src/main/python/systemds/operator/nodes/multi_return.py
 copy src/main/python/tests/{source => list}/__init__.py (100%)
 copy docker/push.sh => src/main/python/tests/list/return_list.dml (87%)
 mode change 100755 => 100644
 copy src/main/python/tests/{algorithms/test_l2svm.py => list/test_list.py} (53%)
 copy src/main/python/tests/{matrix/test_reverse.py => list/test_list_unknown.py} (60%)

[systemds] 03/04: [SYSTEMDS-3005] Python Multi Return in AutoGenerator

Posted by ba...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git

commit dbcce57719e0cc802bdd2da80463ebc2435d5004
Author: baunsgaard <ba...@tugraz.at>
AuthorDate: Thu Jun 3 12:33:45 2021 +0200

    [SYSTEMDS-3005] Python Multi Return in AutoGenerator
    
    This commit change the auto-generator to return multi return nodes,
    in case of multiple returns from function calls.
    It is implemented such that returns can be iterated in a python like
    fashion.
    
    Get Nodes Back
    x,y = f(b,c)
    
    t = f(b,c)
    x = t[0]
    y = t[1]
    
    Get results Back
    x, y = f(b,c).compute()
---
 src/main/python/generator/generator.py             | 117 ++++++++++++---------
 .../resources/template_python_script_imports       |   2 +-
 .../python/systemds/operator/algorithm/__init__.py |  13 ++-
 .../systemds/operator/algorithm/builtin/abstain.py |   6 +-
 .../systemds/operator/algorithm/builtin/als.py     |  14 ++-
 .../systemds/operator/algorithm/builtin/alsCG.py   |  14 ++-
 .../systemds/operator/algorithm/builtin/alsDS.py   |  14 ++-
 .../operator/algorithm/builtin/alsPredict.py       |   6 +-
 .../operator/algorithm/builtin/alsTopkPredict.py   |  14 ++-
 .../systemds/operator/algorithm/builtin/arima.py   |   6 +-
 .../systemds/operator/algorithm/builtin/bandit.py  |  18 +++-
 .../systemds/operator/algorithm/builtin/bivar.py   |  18 +++-
 .../operator/algorithm/builtin/components.py       |   6 +-
 .../operator/algorithm/builtin/confusionMatrix.py  |  14 ++-
 .../systemds/operator/algorithm/builtin/cor.py     |   6 +-
 .../systemds/operator/algorithm/builtin/cox.py     |  22 +++-
 .../systemds/operator/algorithm/builtin/cspline.py |  14 ++-
 .../operator/algorithm/builtin/csplineDS.py        |  14 ++-
 .../systemds/operator/algorithm/builtin/cvlm.py    |  14 ++-
 .../systemds/operator/algorithm/builtin/dbscan.py  |   6 +-
 .../operator/algorithm/builtin/decisionTree.py     |   6 +-
 .../operator/algorithm/builtin/discoverFD.py       |   6 +-
 .../systemds/operator/algorithm/builtin/dist.py    |   6 +-
 .../builtin/{dbscan.py => executePipeline.py}      |  14 ++-
 .../algorithm/builtin/gaussianClassifier.py        |  17 ++-
 .../operator/algorithm/builtin/getAccuracy.py      |   6 +-
 .../systemds/operator/algorithm/builtin/glm.py     |   6 +-
 .../systemds/operator/algorithm/builtin/gmm.py     |  24 ++++-
 .../operator/algorithm/builtin/gmmPredict.py       |  14 ++-
 .../systemds/operator/algorithm/builtin/gnmf.py    |  14 ++-
 .../operator/algorithm/builtin/hyperband.py        |  14 ++-
 .../operator/algorithm/builtin/img_brightness.py   |   6 +-
 .../operator/algorithm/builtin/img_crop.py         |   6 +-
 .../algorithm/builtin/{arima.py => img_cutout.py}  |  32 +++---
 .../builtin/{tomeklink.py => img_invert.py}        |  16 +--
 .../operator/algorithm/builtin/img_mirror.py       |   6 +-
 .../builtin/{tomeklink.py => img_posterize.py}     |  17 +--
 .../algorithm/builtin/{bivar.py => img_rotate.py}  |  18 ++--
 .../builtin/{bivar.py => img_sample_pairing.py}    |  17 +--
 .../algorithm/builtin/{bivar.py => img_shear.py}   |  19 ++--
 .../builtin/{arima.py => img_transform.py}         |  31 +++---
 .../builtin/{arima.py => img_translate.py}         |  32 +++---
 .../operator/algorithm/builtin/imputeByFD.py       |   6 +-
 .../operator/algorithm/builtin/imputeByMean.py     |   6 +-
 .../operator/algorithm/builtin/imputeByMedian.py   |   6 +-
 .../operator/algorithm/builtin/imputeByMode.py     |   6 +-
 .../operator/algorithm/builtin/intersect.py        |   6 +-
 .../systemds/operator/algorithm/builtin/km.py      |  18 +++-
 .../systemds/operator/algorithm/builtin/kmeans.py  |  14 ++-
 .../operator/algorithm/builtin/kmeansPredict.py    |   6 +-
 .../systemds/operator/algorithm/builtin/knnbf.py   |   6 +-
 .../systemds/operator/algorithm/builtin/l2svm.py   |   6 +-
 .../operator/algorithm/builtin/l2svmPredict.py     |  14 ++-
 .../systemds/operator/algorithm/builtin/lasso.py   |   6 +-
 .../systemds/operator/algorithm/builtin/lm.py      |   6 +-
 .../systemds/operator/algorithm/builtin/lmCG.py    |   6 +-
 .../systemds/operator/algorithm/builtin/lmDS.py    |   6 +-
 .../operator/algorithm/builtin/lmPredict.py        |   6 +-
 .../operator/algorithm/builtin/logSumExp.py        |   6 +-
 .../systemds/operator/algorithm/builtin/msvm.py    |   6 +-
 .../operator/algorithm/builtin/msvmPredict.py      |  14 ++-
 .../operator/algorithm/builtin/multiLogReg.py      |   6 +-
 .../algorithm/builtin/multiLogRegPredict.py        |  16 ++-
 .../systemds/operator/algorithm/builtin/na_locf.py |   6 +-
 .../operator/algorithm/builtin/naiveBayes.py       |  16 ++-
 .../algorithm/builtin/naiveBayesPredict.py         |  14 ++-
 .../operator/algorithm/builtin/normalize.py        |   6 +-
 .../systemds/operator/algorithm/builtin/outlier.py |   6 +-
 .../operator/algorithm/builtin/outlierByArima.py   |   6 +-
 .../operator/algorithm/builtin/outlierByIQR.py     |   6 +-
 .../operator/algorithm/builtin/outlierBySd.py      |   6 +-
 .../systemds/operator/algorithm/builtin/pca.py     |  18 +++-
 .../systemds/operator/algorithm/builtin/pnmf.py    |  14 ++-
 .../systemds/operator/algorithm/builtin/ppca.py    |  14 ++-
 .../operator/algorithm/builtin/randomForest.py     |  18 +++-
 .../systemds/operator/algorithm/builtin/scale.py   |  16 ++-
 .../operator/algorithm/builtin/scaleApply.py       |   6 +-
 .../operator/algorithm/builtin/sherlock.py         |  70 +++++++++++-
 .../operator/algorithm/builtin/sherlockPredict.py  |   6 +-
 .../systemds/operator/algorithm/builtin/sigmoid.py |   6 +-
 .../operator/algorithm/builtin/slicefinder.py      |  16 ++-
 .../systemds/operator/algorithm/builtin/smote.py   |   6 +-
 .../systemds/operator/algorithm/builtin/split.py   |  18 +++-
 .../operator/algorithm/builtin/splitBalanced.py    |  18 +++-
 .../operator/algorithm/builtin/stableMarriage.py   |   6 +-
 .../systemds/operator/algorithm/builtin/statsNA.py |   6 +-
 .../systemds/operator/algorithm/builtin/steplm.py  |  14 ++-
 .../operator/algorithm/builtin/toOneHot.py         |   6 +-
 .../operator/algorithm/builtin/tomeklink.py        |  16 ++-
 .../systemds/operator/algorithm/builtin/univar.py  |   6 +-
 .../operator/algorithm/builtin/vectorToCsv.py      |   6 +-
 .../operator/algorithm/builtin/winsorize.py        |   6 +-
 .../systemds/operator/algorithm/builtin/xdummy1.py |   6 +-
 .../systemds/operator/algorithm/builtin/xdummy2.py |  14 ++-
 src/main/python/systemds/operator/nodes/frame.py   |   2 +-
 .../python/systemds/operator/operation_node.py     |   7 +-
 .../python/tests/frame/test_transform_encode.py    |   5 +-
 97 files changed, 916 insertions(+), 313 deletions(-)

diff --git a/src/main/python/generator/generator.py b/src/main/python/generator/generator.py
index bca008a..7ee39e3 100644
--- a/src/main/python/generator/generator.py
+++ b/src/main/python/generator/generator.py
@@ -97,14 +97,12 @@ class PythonAPIFunctionGenerator(object):
     api_template = u"""def {function_name}({parameters}):
     {header}
     {params_dict}
-    return {api_call}\n\n
+    {api_call}\n\n
     """
 
     kwargs_parameter_string = u"**kwargs: Dict[str, VALID_INPUT_TYPES]"
     kwargs_result = u"params_dict.update(kwargs)"
 
-    matrix_check_template = u"\n    {param}._check_matrix_op()"
-
     type_mapping_file = os.path.join('resources', 'type_mapping.json')
 
     type_mapping_pattern = r"^([^\[\s]+)"
@@ -112,8 +110,8 @@ class PythonAPIFunctionGenerator(object):
     path = os.path.dirname(__file__)
     type_mapping_path = os.path.join(path, type_mapping_file)
 
-    with open(type_mapping_path, 'r') as megamap:
-        type_mapping = json.load(megamap)
+    with open(type_mapping_path, 'r') as mapping:
+        type_mapping = json.load(mapping)
 
     def __init__(self):
         super(PythonAPIFunctionGenerator, self).__init__()
@@ -201,47 +199,27 @@ class PythonAPIFunctionGenerator(object):
             )
         return result
 
-    def format_api_call(
-        self,
-        parameters: List[Tuple[str]],
-        return_values: List[Tuple[str]],
-        function_name: str
-    ) -> str:
+    def format_api_call(self,
+                        parameters: List[Tuple[str]],
+                        return_values: List[Tuple[str]],
+                        function_name: str
+                        ) -> str:
+        nl = "\n\t\t"
         length = len(return_values)
-        result = "Matrix({params})"
         param_string = ""
         param = parameters[0]
+        sds_context = "{param}.sds_context".format(param=param[0])
         pattern = r"^[^\[]+"
         if length > 1:
-            output_type_list = ""
-            for value in return_values:
-                output_type = re.search(pattern, value[1])[0].upper()
-
-                if len(output_type_list):
-                    output_type_list = "{output_type_list}, ".format(
-                        output_type_list=output_type_list
-                    )
-                else:
-                    output_type_list = "output_types=["
-
-                output_type_list = "{output_type_list}OutputType.{typ}".format(
-                    output_type_list=output_type_list,
-                    typ=output_type
-                )
-            output_type_list = "{output_type_list}]".format(
-                output_type_list=output_type_list
-            )
-            output_type = "LIST, number_of_outputs={n}, {output_type_list}".format(
-                n=length,
-                output_type_list=output_type_list
+            output_nodes_str, op_assignments = self.generate_output_nodes(
+                return_values, pattern, sds_context)
+            multi_return_str = self.generate_multireturn(
+                sds_context, function_name)
+            result = "\n{out_nodes}\n\n{multi_return}\n\n{op_assign}\n\n    return op".format(
+                out_nodes=output_nodes_str,
+                multi_return=multi_return_str,
+                op_assign=op_assignments
             )
-            result = "{param}.sds_context, \'{function_name}\', named_input_nodes=params_dict, " \
-                "output_type=OutputType.{output_type}".format(
-                     param=param[0],
-                     function_name=function_name,
-                     output_type=output_type
-                )
-            result = "OperationNode({params})".format(params=result)
             return result
         else:
             value = return_values[0]
@@ -250,13 +228,51 @@ class PythonAPIFunctionGenerator(object):
                 output_type = output_type[0].upper()
             else:
                 raise AttributeError("Error in pattern match")
-            result = "{param}.sds_context, \'{function_name}\', named_input_nodes=params_dict".format(
-                     param=param[0],
-                     function_name=function_name,
+            result = ("{sds_context}," +
+                      "{nl}\'{function_name}\'," +
+                      "{nl}named_input_nodes=params_dict").format(
+                sds_context=sds_context,
+                function_name=function_name,
+                nl=nl
             )
-            result = "Matrix({params})".format(params=result)
+            result = "return Matrix({params})".format(params=result)
             return result
 
+    def generate_output_nodes(self, return_values, pattern, sds_context):
+        lines = []
+        op_assignment = []
+        output_nodes = "\n    output_nodes = ["
+        for idx, value in enumerate(return_values):
+            output_type = re.search(pattern, value[1])[0].upper()
+            # print(output_type)
+            output_type = output_type.lower()
+            if output_type == "matrix":
+                object_type= "Matrix"
+            elif output_type == "frame":
+                object_type = "Frame"
+            elif output_type == "double":
+                object_type = "Scalar"
+            elif output_type == "boolean":
+                object_type = "Scalar"
+            elif output_type == "integer":
+                object_type = "Scalar"
+            else:
+                raise ValueError("Unknown type " + object_type)
+            lines.append("    vX_{idx} = {obj}({sds}, '')".format(
+                idx=idx,obj = object_type, sds=sds_context))
+            output_nodes += "vX_{idx}, ".format(idx=idx)
+            op_assignment.append(
+                "    vX_{idx}._unnamed_input_nodes = [op]".format(idx=idx))
+        output_nodes += "]"
+        lines = "\n".join(lines) + output_nodes
+        op_assignment = "\n".join(op_assignment)
+        return lines, op_assignment
+
+    def generate_multireturn(self, sds_context, function_name):
+        return ("    op = MultiReturn({sds}, \'{function_name}\', output_nodes," +
+                " named_input_nodes=params_dict)").format(
+            sds=sds_context, function_name=function_name)
+
 
 class PythonAPIDocumentationGenerator(object):
 
@@ -316,8 +332,8 @@ if __name__ == "__main__":
     fun_generator = PythonAPIFunctionGenerator()
     f_parser = FunctionParser(source_path)
     doc_generator = PythonAPIDocumentationGenerator()
-
-    for dml_file in f_parser.files():
+    files = f_parser.files()
+    for dml_file in files:
         try:
             header_data = f_parser.parse_header(dml_file)
             data = f_parser.parse_function(dml_file)
@@ -332,5 +348,12 @@ if __name__ == "__main__":
             continue
         file_generator.generate_file(
             data["function_name"], script_content, dml_file)
-
+    # [print(x) for x in enumerate(files)]
+    # dml_file = next(x for i, x in enumerate(files) if i == 80)
+    # header_data = f_parser.parse_header(dml_file)
+    # data = f_parser.parse_function(dml_file)
+    # f_parser.check_parameters(header_data, data)
+    # data['function_header'] = doc_generator.generate_documentation(
+    #     header_data)
+    # script_content = fun_generator.generate_function(data)
     file_generator.generate_init_file()
diff --git a/src/main/python/generator/resources/template_python_script_imports b/src/main/python/generator/resources/template_python_script_imports
index adf6c30..fdc16c7 100644
--- a/src/main/python/generator/resources/template_python_script_imports
+++ b/src/main/python/generator/resources/template_python_script_imports
@@ -1,7 +1,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
diff --git a/src/main/python/systemds/operator/algorithm/__init__.py b/src/main/python/systemds/operator/algorithm/__init__.py
index 448f51b..d6f281b 100644
--- a/src/main/python/systemds/operator/algorithm/__init__.py
+++ b/src/main/python/systemds/operator/algorithm/__init__.py
@@ -41,17 +41,24 @@ from .builtin.dbscan import dbscan
 from .builtin.decisionTree import decisionTree 
 from .builtin.discoverFD import discoverFD 
 from .builtin.dist import dist 
-from .builtin.gaussianClassifier import gaussianClassifier 
+from .builtin.executePipeline import executePipeline 
 from .builtin.getAccuracy import getAccuracy 
 from .builtin.glm import glm 
 from .builtin.gmm import gmm 
 from .builtin.gmmPredict import gmmPredict 
 from .builtin.gnmf import gnmf 
-from .builtin.gridSearch import gridSearch 
 from .builtin.hyperband import hyperband 
 from .builtin.img_brightness import img_brightness 
 from .builtin.img_crop import img_crop 
+from .builtin.img_cutout import img_cutout 
+from .builtin.img_invert import img_invert 
 from .builtin.img_mirror import img_mirror 
+from .builtin.img_posterize import img_posterize 
+from .builtin.img_rotate import img_rotate 
+from .builtin.img_sample_pairing import img_sample_pairing 
+from .builtin.img_shear import img_shear 
+from .builtin.img_transform import img_transform 
+from .builtin.img_translate import img_translate 
 from .builtin.imputeByFD import imputeByFD 
 from .builtin.imputeByMean import imputeByMean 
 from .builtin.imputeByMedian import imputeByMedian 
@@ -105,4 +112,4 @@ from .builtin.winsorize import winsorize
 from .builtin.xdummy1 import xdummy1 
 from .builtin.xdummy2 import xdummy2 
 
-__all__ = [abstain, als, alsCG, alsDS, alsPredict, alsTopkPredict, arima, bandit, bivar, components, confusionMatrix, cor, cox, cspline, csplineDS, cvlm, dbscan, decisionTree, discoverFD, dist, gaussianClassifier, getAccuracy, glm, gmm, gmmPredict, gnmf, gridSearch, hyperband, img_brightness, img_crop, img_mirror, imputeByFD, imputeByMean, imputeByMedian, imputeByMode, intersect, km, kmeans, kmeansPredict, knnbf, l2svm, l2svmPredict, lasso, lm, lmCG, lmDS, lmPredict, logSumExp, msvm, msv [...]
+__all__ = [abstain, als, alsCG, alsDS, alsPredict, alsTopkPredict, arima, bandit, bivar, components, confusionMatrix, cor, cox, cspline, csplineDS, cvlm, dbscan, decisionTree, discoverFD, dist, executePipeline, getAccuracy, glm, gmm, gmmPredict, gnmf, hyperband, img_brightness, img_crop, img_cutout, img_invert, img_mirror, img_posterize, img_rotate, img_sample_pairing, img_shear, img_transform, img_translate, imputeByFD, imputeByMean, imputeByMedian, imputeByMode, intersect, km, kmeans,  [...]
diff --git a/src/main/python/systemds/operator/algorithm/builtin/abstain.py b/src/main/python/systemds/operator/algorithm/builtin/abstain.py
index bcc1267..26e8b27 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/abstain.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/abstain.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def abstain(X: OperationNode, Y: OperationNode, threshold: float, **kwargs: Dict
     
     params_dict = {'X':X, 'Y':Y, 'threshold':threshold}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'abstain', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'abstain',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/als.py b/src/main/python/systemds/operator/algorithm/builtin/als.py
index b7147ad..f57630b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/als.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/als.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -43,7 +43,17 @@ def als(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'als', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'als', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsCG.py b/src/main/python/systemds/operator/algorithm/builtin/alsCG.py
index 40589b9..6a43aaa 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsCG.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsCG.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -43,7 +43,17 @@ def alsCG(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'alsCG', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'alsCG', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsDS.py b/src/main/python/systemds/operator/algorithm/builtin/alsDS.py
index f4ca722..e543493 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsDS.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsDS.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -44,7 +44,17 @@ def alsDS(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'alsDS', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'alsDS', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py b/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py
index d22dbc6..26a4e16 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def alsPredict(userIDs: OperationNode, I: OperationNode, L: OperationNode, R: OperationNode):
     
     params_dict = {'userIDs':userIDs, 'I':I, 'L':L, 'R':R}
-    return Matrix(userIDs.sds_context, 'alsPredict', named_input_nodes=params_dict)
+    return Matrix(userIDs.sds_context,
+		'alsPredict',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py b/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py
index afd560b..b7cb189 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -39,7 +39,17 @@ def alsTopkPredict(userIDs: OperationNode, I: OperationNode, L: OperationNode, R
     """
     params_dict = {'userIDs':userIDs, 'I':I, 'L':L, 'R':R}
     params_dict.update(kwargs)
-    return OperationNode(userIDs.sds_context, 'alsTopkPredict', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(userIDs.sds_context, '')
+    vX_1 = Matrix(userIDs.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(userIDs.sds_context, 'alsTopkPredict', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/arima.py b/src/main/python/systemds/operator/algorithm/builtin/arima.py
index 892cc5a..decc43c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/arima.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/arima.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -45,7 +45,9 @@ def arima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'arima', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'arima',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/bandit.py b/src/main/python/systemds/operator/algorithm/builtin/bandit.py
index 02a2107..cd866c3 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/bandit.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/bandit.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,21 @@ def bandit(X_train: OperationNode, Y_train: OperationNode, metaList: Iterable, t
     
     params_dict = {'X_train':X_train, 'Y_train':Y_train, 'metaList':metaList, 'targetList':targetList, 'lp':lp, 'primitives':primitives, 'param':param}
     params_dict.update(kwargs)
-    return OperationNode(X_train.sds_context, 'bandit', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.FRAME, OutputType.MATRIX, OutputType.MATRIX, OutputType.FRAME])
+    
+    vX_0 = Frame(X_train.sds_context, '')
+    vX_1 = Matrix(X_train.sds_context, '')
+    vX_2 = Matrix(X_train.sds_context, '')
+    vX_3 = Frame(X_train.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(X_train.sds_context, 'bandit', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/bivar.py b/src/main/python/systemds/operator/algorithm/builtin/bivar.py
index 6f2bcec..9a9a04d 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/bivar.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/bivar.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -34,7 +34,21 @@ def bivar(X: OperationNode, S1: OperationNode, S2: OperationNode, T1: OperationN
     :return: 'OperationNode' containing  
     """
     params_dict = {'X':X, 'S1':S1, 'S2':S2, 'T1':T1, 'T2':T2, 'verbose':verbose}
-    return OperationNode(X.sds_context, 'bivar', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    vX_3 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(X.sds_context, 'bivar', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/components.py b/src/main/python/systemds/operator/algorithm/builtin/components.py
index 111da45..386db83 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/components.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/components.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def components(G: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'G':G}
     params_dict.update(kwargs)
-    return Matrix(G.sds_context, 'components', named_input_nodes=params_dict)
+    return Matrix(G.sds_context,
+		'components',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py b/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py
index 5e57fde..d124936 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -35,7 +35,17 @@ def confusionMatrix(P: OperationNode, Y: OperationNode):
     :return: 'OperationNode' containing the confusion matrix sums of classifications & the confusion matrix averages of each true class 
     """
     params_dict = {'P':P, 'Y':Y}
-    return OperationNode(P.sds_context, 'confusionMatrix', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(P.sds_context, '')
+    vX_1 = Matrix(P.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(P.sds_context, 'confusionMatrix', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cor.py b/src/main/python/systemds/operator/algorithm/builtin/cor.py
index 33e6ddd..9c0d632 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cor.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cor.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def cor(X: OperationNode):
     
     params_dict = {'X':X}
-    return Matrix(X.sds_context, 'cor', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'cor',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cox.py b/src/main/python/systemds/operator/algorithm/builtin/cox.py
index 1bfe85c..ebc12c7 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cox.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cox.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -48,7 +48,25 @@ def cox(X: OperationNode, TE: OperationNode, F: OperationNode, R: OperationNode,
     """
     params_dict = {'X':X, 'TE':TE, 'F':F, 'R':R}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'cox', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=6, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    vX_3 = Matrix(X.sds_context, '')
+    vX_4 = Matrix(X.sds_context, '')
+    vX_5 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, vX_4, vX_5, ]
+
+    op = MultiReturn(X.sds_context, 'cox', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+    vX_4._unnamed_input_nodes = [op]
+    vX_5._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cspline.py b/src/main/python/systemds/operator/algorithm/builtin/cspline.py
index d60bf4f..8c2af13 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cspline.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cspline.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,17 @@ def cspline(X: OperationNode, Y: OperationNode, inp_x: float, **kwargs: Dict[str
     
     params_dict = {'X':X, 'Y':Y, 'inp_x':inp_x}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'cspline', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'cspline', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py b/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py
index 34d0d13..b4a3d6c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py
@@ -24,14 +24,24 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def csplineDS(X: OperationNode, Y: OperationNode, inp_x: float):
     
     params_dict = {'X':X, 'Y':Y, 'inp_x':inp_x}
-    return OperationNode(X.sds_context, 'csplineDS', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'csplineDS', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cvlm.py b/src/main/python/systemds/operator/algorithm/builtin/cvlm.py
index 72d5159..410910f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cvlm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cvlm.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,17 @@ def cvlm(X: OperationNode, y: OperationNode, k: int, **kwargs: Dict[str, VALID_I
     
     params_dict = {'X':X, 'y':y, 'k':k}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'cvlm', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'cvlm', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/dbscan.py b/src/main/python/systemds/operator/algorithm/builtin/dbscan.py
index a2bb947..477510b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/dbscan.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/dbscan.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def dbscan(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'dbscan', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'dbscan',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py b/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py
index dbd7523..5bc433f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -39,7 +39,9 @@ def decisionTree(X: OperationNode, Y: OperationNode, R: OperationNode, verbose:
     """
     params_dict = {'X':X, 'Y':Y, 'R':R, 'verbose':verbose}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'decisionTree', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'decisionTree',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py b/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py
index b34e2bb..d5292e1 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def discoverFD(X: OperationNode, Mask: OperationNode, threshold: float):
     
     params_dict = {'X':X, 'Mask':Mask, 'threshold':threshold}
-    return Matrix(X.sds_context, 'discoverFD', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'discoverFD',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/dist.py b/src/main/python/systemds/operator/algorithm/builtin/dist.py
index 47a0f22..02c7c6e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/dist.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/dist.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def dist(X: OperationNode):
     
     params_dict = {'X':X}
-    return Matrix(X.sds_context, 'dist', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'dist',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/dbscan.py b/src/main/python/systemds/operator/algorithm/builtin/executePipeline.py
similarity index 66%
copy from src/main/python/systemds/operator/algorithm/builtin/dbscan.py
copy to src/main/python/systemds/operator/algorithm/builtin/executePipeline.py
index a2bb947..38d3ac1 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/dbscan.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/executePipeline.py
@@ -20,19 +20,23 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/dbscan.dml
+# Autogenerated From : scripts/builtin/executePipeline.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def dbscan(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
-    
+def executePipeline(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+    """
+    :return: 'OperationNode' containing encoding of categorical features & features & ohe call, to call inside eval as a function & to call inside eval as a function & doing relative over-sampling & count  & replace the null with default values & version of pca 
+    """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'dbscan', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'executePipeline',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py b/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py
index 8ce91e1..761e5c5 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -36,7 +36,20 @@ def gaussianClassifier(D: OperationNode, C: OperationNode, **kwargs: Dict[str, V
     """
     params_dict = {'D':D, 'C':C}
     params_dict.update(kwargs)
-    return OperationNode(D.sds_context, 'gaussianClassifier', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.LIST, OutputType.MATRIX])
+    
+    vX_0 = Matrix(D.sds_context, '')
+    vX_1 = Matrix(D.sds_context, '')
+    vX_3 = Matrix(D.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(D.sds_context, 'gaussianClassifier', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py b/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py
index 57ea544..736a9b3 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def getAccuracy(y: OperationNode, yhat: OperationNode, **kwargs: Dict[str, VALID
     
     params_dict = {'y':y, 'yhat':yhat}
     params_dict.update(kwargs)
-    return Matrix(y.sds_context, 'getAccuracy', named_input_nodes=params_dict)
+    return Matrix(y.sds_context,
+		'getAccuracy',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/glm.py b/src/main/python/systemds/operator/algorithm/builtin/glm.py
index 31c215c..b164815 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/glm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/glm.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def glm(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPE
     
     params_dict = {'X':X, 'Y':Y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'glm', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'glm',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gmm.py b/src/main/python/systemds/operator/algorithm/builtin/gmm.py
index 87f293c..f81ac4a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gmm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gmm.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,27 @@ def gmm(X: OperationNode, verbose: bool, **kwargs: Dict[str, VALID_INPUT_TYPES])
     
     params_dict = {'X':X, 'verbose':verbose}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'gmm', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=7, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.INTEGER, OutputType.DOUBLE, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Scalar(X.sds_context, '')
+    vX_3 = Scalar(X.sds_context, '')
+    vX_4 = Matrix(X.sds_context, '')
+    vX_5 = Matrix(X.sds_context, '')
+    vX_6 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, vX_4, vX_5, vX_6, ]
+
+    op = MultiReturn(X.sds_context, 'gmm', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+    vX_4._unnamed_input_nodes = [op]
+    vX_5._unnamed_input_nodes = [op]
+    vX_6._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py
index 773a803..2b5895a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -38,7 +38,17 @@ def gmmPredict(X: OperationNode, weight: OperationNode, mu: OperationNode, preci
     :return: 'OperationNode' containing predicted cluster labels & probabilities of belongingness & for new instances given the variance and mean of fitted data 
     """
     params_dict = {'X':X, 'weight':weight, 'mu':mu, 'precisions_cholesky':precisions_cholesky, 'model':model}
-    return OperationNode(X.sds_context, 'gmmPredict', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'gmmPredict', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gnmf.py b/src/main/python/systemds/operator/algorithm/builtin/gnmf.py
index 2c548ff..ed69606 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gnmf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gnmf.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,17 @@ def gnmf(X: OperationNode, rnk: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'X':X, 'rnk':rnk}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'gnmf', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'gnmf', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/hyperband.py b/src/main/python/systemds/operator/algorithm/builtin/hyperband.py
index 6f67006..08d0bba 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/hyperband.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/hyperband.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,17 @@ def hyperband(X_train: OperationNode, y_train: OperationNode, X_val: OperationNo
     
     params_dict = {'X_train':X_train, 'y_train':y_train, 'X_val':X_val, 'y_val':y_val, 'params':params, 'paramRanges':paramRanges}
     params_dict.update(kwargs)
-    return OperationNode(X_train.sds_context, 'hyperband', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.FRAME])
+    
+    vX_0 = Matrix(X_train.sds_context, '')
+    vX_1 = Frame(X_train.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X_train.sds_context, 'hyperband', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py b/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
index d164682..171ecef 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def img_brightness(img_in: OperationNode, value: float, channel_max: int):
     
     params_dict = {'img_in':img_in, 'value':value, 'channel_max':channel_max}
-    return Matrix(img_in.sds_context, 'img_brightness', named_input_nodes=params_dict)
+    return Matrix(img_in.sds_context,
+		'img_brightness',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_crop.py b/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
index 9800004..848dbdb 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def img_crop(img_in: OperationNode, w: int, h: int, x_offset: int, y_offset: int):
     
     params_dict = {'img_in':img_in, 'w':w, 'h':h, 'x_offset':x_offset, 'y_offset':y_offset}
-    return Matrix(img_in.sds_context, 'img_crop', named_input_nodes=params_dict)
+    return Matrix(img_in.sds_context,
+		'img_crop',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/arima.py b/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
similarity index 54%
copy from src/main/python/systemds/operator/algorithm/builtin/arima.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
index 892cc5a..60e55e8 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/arima.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
@@ -20,32 +20,28 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/arima.dml
+# Autogenerated From : scripts/builtin/img_cutout.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def arima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+def img_cutout(img_in: OperationNode, x: int, y: int, width: int, height: int, fill_value: float):
     """
-    :param X: The input Matrix to apply Arima on.
-    :param max_func_invoc: ?
-    :param p: non-seasonal AR order
-    :param d: non-seasonal differencing order
-    :param q: non-seasonal MA order
-    :param P: seasonal AR order
-    :param D: seasonal differencing order
-    :param Q: seasonal MA order
-    :param s: period in terms of number of time-steps
-    :param include_mean: center to mean 0, and include in result
-    :param solver: solver, is either "cg" or "jacobi"
-    :return: 'OperationNode' containing the calculated coefficients 
+    :param img_in: Input image as 2D matrix with top left corner at [1, 1]
+    :param x: Column index of the top left corner of the rectangle (starting at 1)
+    :param y: Row index of the top left corner of the rectangle (starting at 1)
+    :param width: Width of the rectangle (must be positive)
+    :param height: Height of the rectangle (must be positive)
+    :param fill_value: The value to set for the rectangle
+    :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'X':X}
-    params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'arima', named_input_nodes=params_dict)
+    params_dict = {'img_in':img_in, 'x':x, 'y':y, 'width':width, 'height':height, 'fill_value':fill_value}
+    return Matrix(img_in.sds_context,
+		'img_cutout',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py b/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
similarity index 71%
copy from src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_invert.py
index 499586e..76c9613 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
@@ -20,22 +20,24 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/tomeklink.dml
+# Autogenerated From : scripts/builtin/img_invert.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def tomeklink(X: OperationNode, y: OperationNode):
+def img_invert(img_in: OperationNode, max_value: float):
     """
-    :param X: Data Matrix (nxm)
-    :param y: Label Matrix (nx1)
+    :param img_in: Input image
+    :param max_value: The maximum value pixels can have
     :return: 'OperationNode' containing  
     """
-    params_dict = {'X':X, 'y':y}
-    return OperationNode(X.sds_context, 'tomeklink', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=3, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    params_dict = {'img_in':img_in, 'max_value':max_value}
+    return Matrix(img_in.sds_context,
+		'img_invert',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py b/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
index dff4c6c..3e1833e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def img_mirror(img_in: OperationNode, horizontal_axis: bool):
     
     params_dict = {'img_in':img_in, 'horizontal_axis':horizontal_axis}
-    return Matrix(img_in.sds_context, 'img_mirror', named_input_nodes=params_dict)
+    return Matrix(img_in.sds_context,
+		'img_mirror',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py b/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
similarity index 70%
copy from src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
index 499586e..3595ea4 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
@@ -20,22 +20,25 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/tomeklink.dml
+# Autogenerated From : scripts/builtin/img_posterize.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def tomeklink(X: OperationNode, y: OperationNode):
+def img_posterize(img_in: OperationNode, bits: int):
     """
-    :param X: Data Matrix (nxm)
-    :param y: Label Matrix (nx1)
+    :param img_in: Input image
+    :param bits: The number of bits keep for the values.
+    :param 1: and white, 8 means every integer between 0 and 255.
     :return: 'OperationNode' containing  
     """
-    params_dict = {'X':X, 'y':y}
-    return OperationNode(X.sds_context, 'tomeklink', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=3, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    params_dict = {'img_in':img_in, 'bits':bits}
+    return Matrix(img_in.sds_context,
+		'img_posterize',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/bivar.py b/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
similarity index 62%
copy from src/main/python/systemds/operator/algorithm/builtin/bivar.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
index 6f2bcec..71ec866 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/bivar.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
@@ -20,21 +20,25 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/bivar.dml
+# Autogenerated From : scripts/builtin/img_rotate.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def bivar(X: OperationNode, S1: OperationNode, S2: OperationNode, T1: OperationNode, T2: OperationNode, verbose: bool):
+def img_rotate(img_in: OperationNode, radians: float, fill_value: float):
     """
-    :param verbose: Print bivar stats
-    :return: 'OperationNode' containing  
+    :param img_in: Input image as 2D matrix with top left corner at [1, 1]
+    :param radians: The value by which to rotate in radian.
+    :param fill_value: The background color revealed by the rotation
+    :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'X':X, 'S1':S1, 'S2':S2, 'T1':T1, 'T2':T2, 'verbose':verbose}
-    return OperationNode(X.sds_context, 'bivar', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    params_dict = {'img_in':img_in, 'radians':radians, 'fill_value':fill_value}
+    return Matrix(img_in.sds_context,
+		'img_rotate',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/bivar.py b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
similarity index 66%
copy from src/main/python/systemds/operator/algorithm/builtin/bivar.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
index 6f2bcec..786d6a3 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/bivar.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
@@ -20,21 +20,26 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/bivar.dml
+# Autogenerated From : scripts/builtin/img_sample_pairing.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def bivar(X: OperationNode, S1: OperationNode, S2: OperationNode, T1: OperationNode, T2: OperationNode, verbose: bool):
+def img_sample_pairing(img_in1: OperationNode, img_in2: OperationNode, weight: float):
     """
-    :param verbose: Print bivar stats
+    :param img_in1: First input image
+    :param img_in2: Second input image
+    :param weight: The weight given to the second image.
+    :param 0: img_in1, 1 means only img_in2 will be visible
     :return: 'OperationNode' containing  
     """
-    params_dict = {'X':X, 'S1':S1, 'S2':S2, 'T1':T1, 'T2':T2, 'verbose':verbose}
-    return OperationNode(X.sds_context, 'bivar', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    params_dict = {'img_in1':img_in1, 'img_in2':img_in2, 'weight':weight}
+    return Matrix(img_in1.sds_context,
+		'img_sample_pairing',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/bivar.py b/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
similarity index 59%
copy from src/main/python/systemds/operator/algorithm/builtin/bivar.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_shear.py
index 6f2bcec..3844992 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/bivar.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
@@ -20,21 +20,26 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/bivar.dml
+# Autogenerated From : scripts/builtin/img_shear.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def bivar(X: OperationNode, S1: OperationNode, S2: OperationNode, T1: OperationNode, T2: OperationNode, verbose: bool):
+def img_shear(img_in: OperationNode, shear_x: float, shear_y: float, fill_value: float):
     """
-    :param verbose: Print bivar stats
-    :return: 'OperationNode' containing  
+    :param img_in: Input image as 2D matrix with top left corner at [1, 1]
+    :param shear_x: Shearing factor for horizontal shearing
+    :param shear_y: Shearing factor for vertical shearing
+    :param fill_value: The background color revealed by the shearing
+    :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'X':X, 'S1':S1, 'S2':S2, 'T1':T1, 'T2':T2, 'verbose':verbose}
-    return OperationNode(X.sds_context, 'bivar', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    params_dict = {'img_in':img_in, 'shear_x':shear_x, 'shear_y':shear_y, 'fill_value':fill_value}
+    return Matrix(img_in.sds_context,
+		'img_shear',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/arima.py b/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
similarity index 55%
copy from src/main/python/systemds/operator/algorithm/builtin/arima.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_transform.py
index 892cc5a..4a3e476 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/arima.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
@@ -20,32 +20,27 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/arima.dml
+# Autogenerated From : scripts/builtin/img_transform.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def arima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+def img_transform(img_in: OperationNode, out_w: int, out_h: int, a: float, b: float, c: float, d: float, e: float, f: float, fill_value: float):
     """
-    :param X: The input Matrix to apply Arima on.
-    :param max_func_invoc: ?
-    :param p: non-seasonal AR order
-    :param d: non-seasonal differencing order
-    :param q: non-seasonal MA order
-    :param P: seasonal AR order
-    :param D: seasonal differencing order
-    :param Q: seasonal MA order
-    :param s: period in terms of number of time-steps
-    :param include_mean: center to mean 0, and include in result
-    :param solver: solver, is either "cg" or "jacobi"
-    :return: 'OperationNode' containing the calculated coefficients 
+    :param img_in: Input image as 2D matrix with top left corner at [1, 1]
+    :param out_w: Width of the output image
+    :param out_h: Height of the output image
+    :param abcdef: The first two rows of the affine matrix in row-major order
+    :param fill_value: The background of the image
+    :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'X':X}
-    params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'arima', named_input_nodes=params_dict)
+    params_dict = {'img_in':img_in, 'out_w':out_w, 'out_h':out_h, 'a':a, 'b':b, 'c':c, 'd':d, 'e':e, 'f':f, 'fill_value':fill_value}
+    return Matrix(img_in.sds_context,
+		'img_transform',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/arima.py b/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
similarity index 54%
copy from src/main/python/systemds/operator/algorithm/builtin/arima.py
copy to src/main/python/systemds/operator/algorithm/builtin/img_translate.py
index 892cc5a..8725b14 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/arima.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
@@ -20,32 +20,28 @@
 # -------------------------------------------------------------
 
 # Autogenerated By   : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/arima.dml
+# Autogenerated From : scripts/builtin/img_translate.dml
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def arima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+def img_translate(img_in: OperationNode, offset_x: float, offset_y: float, out_w: int, out_h: int, fill_value: float):
     """
-    :param X: The input Matrix to apply Arima on.
-    :param max_func_invoc: ?
-    :param p: non-seasonal AR order
-    :param d: non-seasonal differencing order
-    :param q: non-seasonal MA order
-    :param P: seasonal AR order
-    :param D: seasonal differencing order
-    :param Q: seasonal MA order
-    :param s: period in terms of number of time-steps
-    :param include_mean: center to mean 0, and include in result
-    :param solver: solver, is either "cg" or "jacobi"
-    :return: 'OperationNode' containing the calculated coefficients 
+    :param img_in: Input image as 2D matrix with top left corner at [1, 1]
+    :param offset_x: The distance to move the image in x direction
+    :param offset_y: The distance to move the image in y direction
+    :param out_w: Width of the output image
+    :param out_h: Height of the output image
+    :param fill_value: The background of the image
+    :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'X':X}
-    params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'arima', named_input_nodes=params_dict)
+    params_dict = {'img_in':img_in, 'offset_x':offset_x, 'offset_y':offset_y, 'out_w':out_w, 'out_h':out_h, 'fill_value':fill_value}
+    return Matrix(img_in.sds_context,
+		'img_translate',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py
index 38d4897..fc306bf 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def imputeByFD(X: OperationNode, sourceAttribute: int, targetAttribute: int, thr
     
     params_dict = {'X':X, 'sourceAttribute':sourceAttribute, 'targetAttribute':targetAttribute, 'threshold':threshold}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'imputeByFD', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'imputeByFD',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py
index d29cb5f..5f6e5dc 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def imputeByMean(X: OperationNode, mask: OperationNode):
     
     params_dict = {'X':X, 'mask':mask}
-    return Matrix(X.sds_context, 'imputeByMean', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'imputeByMean',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py
index 7afc3c9..3aa3103 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def imputeByMedian(X: OperationNode, mask: OperationNode):
     
     params_dict = {'X':X, 'mask':mask}
-    return Matrix(X.sds_context, 'imputeByMedian', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'imputeByMedian',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py
index 1bfc787..dc613fc 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def imputeByMode(X: OperationNode):
     
     params_dict = {'X':X}
-    return Matrix(X.sds_context, 'imputeByMode', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'imputeByMode',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/intersect.py b/src/main/python/systemds/operator/algorithm/builtin/intersect.py
index 4320885..b0c2c80 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/intersect.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/intersect.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def intersect(X: OperationNode, Y: OperationNode):
     
     params_dict = {'X':X, 'Y':Y}
-    return Matrix(X.sds_context, 'intersect', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'intersect',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/km.py b/src/main/python/systemds/operator/algorithm/builtin/km.py
index 4009d5b..ef5ea84 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/km.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/km.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -47,7 +47,21 @@ def km(X: OperationNode, TE: OperationNode, GI: OperationNode, SI: OperationNode
     """
     params_dict = {'X':X, 'TE':TE, 'GI':GI, 'SI':SI}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'km', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    vX_3 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(X.sds_context, 'km', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/kmeans.py b/src/main/python/systemds/operator/algorithm/builtin/kmeans.py
index b929979..82c2a3f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/kmeans.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/kmeans.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -42,7 +42,17 @@ def kmeans(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'kmeans', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'kmeans', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py b/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py
index 31056ee..ef85ff7 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -35,7 +35,9 @@ def kmeansPredict(X: OperationNode, C: OperationNode):
     :return: 'OperationNode' containing the mapping of records to centroids 
     """
     params_dict = {'X':X, 'C':C}
-    return Matrix(X.sds_context, 'kmeansPredict', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'kmeansPredict',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/knnbf.py b/src/main/python/systemds/operator/algorithm/builtin/knnbf.py
index 185e8ea..2a7411e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/knnbf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/knnbf.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def knnbf(X: OperationNode, T: OperationNode, k_value: int):
     
     params_dict = {'X':X, 'T':T, 'k_value':k_value}
-    return Matrix(X.sds_context, 'knnbf', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'knnbf',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/l2svm.py b/src/main/python/systemds/operator/algorithm/builtin/l2svm.py
index ca0d2a0..3e7d0e6 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/l2svm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/l2svm.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -43,7 +43,9 @@ def l2svm(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TY
     """
     params_dict = {'X':X, 'Y':Y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'l2svm', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'l2svm',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py
index 58bbaa9..dd0ea44 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -37,7 +37,17 @@ def l2svmPredict(X: OperationNode, W: OperationNode, **kwargs: Dict[str, VALID_I
     """
     params_dict = {'X':X, 'W':W}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'l2svmPredict', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'l2svmPredict', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lasso.py b/src/main/python/systemds/operator/algorithm/builtin/lasso.py
index ba8c805..a299180 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lasso.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lasso.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -40,7 +40,9 @@ def lasso(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TY
     """
     params_dict = {'X':X, 'y':y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'lasso', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'lasso',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lm.py b/src/main/python/systemds/operator/algorithm/builtin/lm.py
index c341efc..7400c25 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lm.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -41,7 +41,9 @@ def lm(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES
     """
     params_dict = {'X':X, 'y':y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'lm', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'lm',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lmCG.py b/src/main/python/systemds/operator/algorithm/builtin/lmCG.py
index 0de47fa..7d9ef78 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lmCG.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lmCG.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def lmCG(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYP
     
     params_dict = {'X':X, 'y':y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'lmCG', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'lmCG',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lmDS.py b/src/main/python/systemds/operator/algorithm/builtin/lmDS.py
index 1cd29a2..de6bbee 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lmDS.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lmDS.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def lmDS(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYP
     
     params_dict = {'X':X, 'y':y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'lmDS', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'lmDS',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py
index f931467..28bf6fe 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def lmPredict(X: OperationNode, B: OperationNode, ytest: OperationNode, **kwargs
     
     params_dict = {'X':X, 'B':B, 'ytest':ytest}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'lmPredict', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'lmPredict',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py b/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py
index 2db1b6c..ddd0a20 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def logSumExp(M: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'M':M}
     params_dict.update(kwargs)
-    return Matrix(M.sds_context, 'logSumExp', named_input_nodes=params_dict)
+    return Matrix(M.sds_context,
+		'logSumExp',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/msvm.py b/src/main/python/systemds/operator/algorithm/builtin/msvm.py
index 018182f..5fca57c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/msvm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/msvm.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def msvm(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYP
     
     params_dict = {'X':X, 'Y':Y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'msvm', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'msvm',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py
index 77a2e53..8b061cc 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -35,7 +35,17 @@ def msvmPredict(X: OperationNode, W: OperationNode):
     :return: 'OperationNode' containing classification labels maxed to ones and zeros. 
     """
     params_dict = {'X':X, 'W':W}
-    return OperationNode(X.sds_context, 'msvmPredict', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'msvmPredict', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py b/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py
index 893763b..6ad34fa 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -42,7 +42,9 @@ def multiLogReg(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_IN
     """
     params_dict = {'X':X, 'Y':Y}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'multiLogReg', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'multiLogReg',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py b/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py
index 9370563..b3d6290 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -38,7 +38,19 @@ def multiLogRegPredict(X: OperationNode, B: OperationNode, Y: OperationNode, **k
     """
     params_dict = {'X':X, 'B':B, 'Y':Y}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'multiLogRegPredict', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=3, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.DOUBLE])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Scalar(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, ]
+
+    op = MultiReturn(X.sds_context, 'multiLogRegPredict', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/na_locf.py b/src/main/python/systemds/operator/algorithm/builtin/na_locf.py
index baed229..aacd2ab 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/na_locf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/na_locf.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def na_locf(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'na_locf', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'na_locf',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py b/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py
index 9bb127f..d049531 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,5 +32,17 @@ def naiveBayes(D: OperationNode, C: OperationNode, **kwargs: Dict[str, VALID_INP
     
     params_dict = {'D':D, 'C':C}
     params_dict.update(kwargs)
-    return OperationNode(D.sds_context, 'naiveBayes', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(D.sds_context, '')
+    vX_1 = Matrix(D.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(D.sds_context, 'naiveBayes', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
+
+
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py b/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py
index 4763377..1f1603f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py
@@ -24,14 +24,24 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def naiveBayesPredict(X: OperationNode, P: OperationNode, C: OperationNode):
     
     params_dict = {'X':X, 'P':P, 'C':C}
-    return OperationNode(X.sds_context, 'naiveBayesPredict', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'naiveBayesPredict', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/normalize.py b/src/main/python/systemds/operator/algorithm/builtin/normalize.py
index 335dacb..3578830 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/normalize.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/normalize.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def normalize(X: OperationNode):
     
     params_dict = {'X':X}
-    return Matrix(X.sds_context, 'normalize', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'normalize',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlier.py b/src/main/python/systemds/operator/algorithm/builtin/outlier.py
index 54432de..0e3fd85 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlier.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlier.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def outlier(X: OperationNode, opposite: bool):
     
     params_dict = {'X':X, 'opposite':opposite}
-    return Matrix(X.sds_context, 'outlier', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'outlier',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py b/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py
index 851cd66..47589ab 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def outlierByArima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'outlierByArima', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'outlierByArima',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py b/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py
index 54f5fe2..294b53f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def outlierByIQR(X: OperationNode, k: float, max_iterations: int, **kwargs: Dict
     
     params_dict = {'X':X, 'k':k, 'max_iterations':max_iterations}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'outlierByIQR', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'outlierByIQR',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py b/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py
index 3032bc5..848e193 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def outlierBySd(X: OperationNode, max_iterations: int, **kwargs: Dict[str, VALID
     
     params_dict = {'X':X, 'max_iterations':max_iterations}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'outlierBySd', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'outlierBySd',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/pca.py b/src/main/python/systemds/operator/algorithm/builtin/pca.py
index 9ac19f8..5fff19c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/pca.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/pca.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -38,7 +38,21 @@ def pca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'pca', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    vX_3 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(X.sds_context, 'pca', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/pnmf.py b/src/main/python/systemds/operator/algorithm/builtin/pnmf.py
index 2dce1d3..7be0d1d 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/pnmf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/pnmf.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,17 @@ def pnmf(X: OperationNode, rnk: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'X':X, 'rnk':rnk}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'pnmf', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'pnmf', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/ppca.py b/src/main/python/systemds/operator/algorithm/builtin/ppca.py
index 01387bb..4981762 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/ppca.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/ppca.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -40,7 +40,17 @@ def ppca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'ppca', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'ppca', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/randomForest.py b/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
index dee1839..0cc28fc 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -49,7 +49,21 @@ def randomForest(X: OperationNode, Y: OperationNode, R: OperationNode, **kwargs:
     """
     params_dict = {'X':X, 'Y':Y, 'R':R}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'randomForest', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    vX_3 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(X.sds_context, 'randomForest', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/scale.py b/src/main/python/systemds/operator/algorithm/builtin/scale.py
index ff84e9a..c6017cf 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/scale.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/scale.py
@@ -24,14 +24,26 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def scale(X: OperationNode, center: bool, scale: bool):
     
     params_dict = {'X':X, 'center':center, 'scale':scale}
-    return OperationNode(X.sds_context, 'scale', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=3, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, ]
+
+    op = MultiReturn(X.sds_context, 'scale', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py b/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py
index 2ca4657..0a95e3c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def scaleApply(X: OperationNode, Centering: OperationNode, ScaleFactor: OperationNode):
     
     params_dict = {'X':X, 'Centering':Centering, 'ScaleFactor':ScaleFactor}
-    return Matrix(X.sds_context, 'scaleApply', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'scaleApply',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/sherlock.py b/src/main/python/systemds/operator/algorithm/builtin/sherlock.py
index 9558f7a..cbae8e7 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/sherlock.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/sherlock.py
@@ -24,14 +24,80 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def sherlock(X_train: OperationNode, y_train: OperationNode):
     
     params_dict = {'X_train':X_train, 'y_train':y_train}
-    return OperationNode(X_train.sds_context, 'sherlock', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=30, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATR [...]
+    
+    vX_0 = Matrix(X_train.sds_context, '')
+    vX_1 = Matrix(X_train.sds_context, '')
+    vX_2 = Matrix(X_train.sds_context, '')
+    vX_3 = Matrix(X_train.sds_context, '')
+    vX_4 = Matrix(X_train.sds_context, '')
+    vX_5 = Matrix(X_train.sds_context, '')
+    vX_6 = Matrix(X_train.sds_context, '')
+    vX_7 = Matrix(X_train.sds_context, '')
+    vX_8 = Matrix(X_train.sds_context, '')
+    vX_9 = Matrix(X_train.sds_context, '')
+    vX_10 = Matrix(X_train.sds_context, '')
+    vX_11 = Matrix(X_train.sds_context, '')
+    vX_12 = Matrix(X_train.sds_context, '')
+    vX_13 = Matrix(X_train.sds_context, '')
+    vX_14 = Matrix(X_train.sds_context, '')
+    vX_15 = Matrix(X_train.sds_context, '')
+    vX_16 = Matrix(X_train.sds_context, '')
+    vX_17 = Matrix(X_train.sds_context, '')
+    vX_18 = Matrix(X_train.sds_context, '')
+    vX_19 = Matrix(X_train.sds_context, '')
+    vX_20 = Matrix(X_train.sds_context, '')
+    vX_21 = Matrix(X_train.sds_context, '')
+    vX_22 = Matrix(X_train.sds_context, '')
+    vX_23 = Matrix(X_train.sds_context, '')
+    vX_24 = Matrix(X_train.sds_context, '')
+    vX_25 = Matrix(X_train.sds_context, '')
+    vX_26 = Matrix(X_train.sds_context, '')
+    vX_27 = Matrix(X_train.sds_context, '')
+    vX_28 = Matrix(X_train.sds_context, '')
+    vX_29 = Matrix(X_train.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, vX_4, vX_5, vX_6, vX_7, vX_8, vX_9, vX_10, vX_11, vX_12, vX_13, vX_14, vX_15, vX_16, vX_17, vX_18, vX_19, vX_20, vX_21, vX_22, vX_23, vX_24, vX_25, vX_26, vX_27, vX_28, vX_29, ]
+
+    op = MultiReturn(X_train.sds_context, 'sherlock', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+    vX_4._unnamed_input_nodes = [op]
+    vX_5._unnamed_input_nodes = [op]
+    vX_6._unnamed_input_nodes = [op]
+    vX_7._unnamed_input_nodes = [op]
+    vX_8._unnamed_input_nodes = [op]
+    vX_9._unnamed_input_nodes = [op]
+    vX_10._unnamed_input_nodes = [op]
+    vX_11._unnamed_input_nodes = [op]
+    vX_12._unnamed_input_nodes = [op]
+    vX_13._unnamed_input_nodes = [op]
+    vX_14._unnamed_input_nodes = [op]
+    vX_15._unnamed_input_nodes = [op]
+    vX_16._unnamed_input_nodes = [op]
+    vX_17._unnamed_input_nodes = [op]
+    vX_18._unnamed_input_nodes = [op]
+    vX_19._unnamed_input_nodes = [op]
+    vX_20._unnamed_input_nodes = [op]
+    vX_21._unnamed_input_nodes = [op]
+    vX_22._unnamed_input_nodes = [op]
+    vX_23._unnamed_input_nodes = [op]
+    vX_24._unnamed_input_nodes = [op]
+    vX_25._unnamed_input_nodes = [op]
+    vX_26._unnamed_input_nodes = [op]
+    vX_27._unnamed_input_nodes = [op]
+    vX_28._unnamed_input_nodes = [op]
+    vX_29._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py b/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py
index 12e35ef..91aabff 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def sherlockPredict(X: OperationNode, cW1: OperationNode, cb1: OperationNode, cW2: OperationNode, cb2: OperationNode, cW3: OperationNode, cb3: OperationNode, wW1: OperationNode, wb1: OperationNode, wW2: OperationNode, wb2: OperationNode, wW3: OperationNode, wb3: OperationNode, pW1: OperationNode, pb1: OperationNode, pW2: OperationNode, pb2: OperationNode, pW3: OperationNode, pb3: OperationNode, sW1: OperationNode, sb1: OperationNode, sW2: OperationNode, sb2: OperationNode, sW3: Operation [...]
     
     params_dict = {'X':X, 'cW1':cW1, 'cb1':cb1, 'cW2':cW2, 'cb2':cb2, 'cW3':cW3, 'cb3':cb3, 'wW1':wW1, 'wb1':wb1, 'wW2':wW2, 'wb2':wb2, 'wW3':wW3, 'wb3':wb3, 'pW1':pW1, 'pb1':pb1, 'pW2':pW2, 'pb2':pb2, 'pW3':pW3, 'pb3':pb3, 'sW1':sW1, 'sb1':sb1, 'sW2':sW2, 'sb2':sb2, 'sW3':sW3, 'sb3':sb3, 'fW1':fW1, 'fb1':fb1, 'fW2':fW2, 'fb2':fb2, 'fW3':fW3, 'fb3':fb3}
-    return Matrix(X.sds_context, 'sherlockPredict', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'sherlockPredict',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py b/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py
index a11a33e..96f5820 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def sigmoid(X: OperationNode):
     
     params_dict = {'X':X}
-    return Matrix(X.sds_context, 'sigmoid', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'sigmoid',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py b/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py
index c046769..42fef5e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,19 @@ def slicefinder(X: OperationNode, e: OperationNode, **kwargs: Dict[str, VALID_IN
     
     params_dict = {'X':X, 'e':e}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'slicefinder', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=3, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, ]
+
+    op = MultiReturn(X.sds_context, 'slicefinder', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/smote.py b/src/main/python/systemds/operator/algorithm/builtin/smote.py
index d1b64b8..2084b59 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/smote.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/smote.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def smote(X: OperationNode, mask: OperationNode, **kwargs: Dict[str, VALID_INPUT
     
     params_dict = {'X':X, 'mask':mask}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'smote', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'smote',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/split.py b/src/main/python/systemds/operator/algorithm/builtin/split.py
index e4c5ea7..1a8e306 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/split.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/split.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,21 @@ def split(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TY
     
     params_dict = {'X':X, 'Y':Y}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'split', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    vX_3 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(X.sds_context, 'split', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py b/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py
index b1bf9a8..6eb9962 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py
@@ -24,14 +24,28 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def splitBalanced(X: OperationNode, Y: OperationNode, splitRatio: float, verbose: bool):
     
     params_dict = {'X':X, 'Y':Y, 'splitRatio':splitRatio, 'verbose':verbose}
-    return OperationNode(X.sds_context, 'splitBalanced', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=4, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    vX_3 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
+
+    op = MultiReturn(X.sds_context, 'splitBalanced', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+    vX_3._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py b/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py
index 26c8cb4..6c09dc5 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -40,7 +40,9 @@ def stableMarriage(P: OperationNode, A: OperationNode, **kwargs: Dict[str, VALID
     """
     params_dict = {'P':P, 'A':A}
     params_dict.update(kwargs)
-    return Matrix(P.sds_context, 'stableMarriage', named_input_nodes=params_dict)
+    return Matrix(P.sds_context,
+		'stableMarriage',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/statsNA.py b/src/main/python/systemds/operator/algorithm/builtin/statsNA.py
index be8d1a7..2e5e5bc 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/statsNA.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/statsNA.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,9 @@ def statsNA(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
     params_dict = {'X':X}
     params_dict.update(kwargs)
-    return Matrix(X.sds_context, 'statsNA', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'statsNA',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/steplm.py b/src/main/python/systemds/operator/algorithm/builtin/steplm.py
index 152d10d..5565b4e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/steplm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/steplm.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -32,7 +32,17 @@ def steplm(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_T
     
     params_dict = {'X':X, 'y':y}
     params_dict.update(kwargs)
-    return OperationNode(X.sds_context, 'steplm', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'steplm', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py b/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
index ca11663..105ec27 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -35,7 +35,9 @@ def toOneHot(X: OperationNode, numClasses: int):
     :return: 'OperationNode' containing matrix with shape (n, numclasses) 
     """
     params_dict = {'X':X, 'numClasses':numClasses}
-    return Matrix(X.sds_context, 'toOneHot', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'toOneHot',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py b/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
index 499586e..f9d565e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
@@ -24,7 +24,7 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
@@ -35,7 +35,19 @@ def tomeklink(X: OperationNode, y: OperationNode):
     :return: 'OperationNode' containing  
     """
     params_dict = {'X':X, 'y':y}
-    return OperationNode(X.sds_context, 'tomeklink', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=3, output_types=[OutputType.MATRIX, OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    vX_2 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, vX_2, ]
+
+    op = MultiReturn(X.sds_context, 'tomeklink', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+    vX_2._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/univar.py b/src/main/python/systemds/operator/algorithm/builtin/univar.py
index 534d41e..bf165c2 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/univar.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/univar.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def univar(X: OperationNode, types: OperationNode):
     
     params_dict = {'X':X, 'types':types}
-    return Matrix(X.sds_context, 'univar', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'univar',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py b/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py
index b011a77..065e9c5 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def vectorToCsv(mask: OperationNode):
     
     params_dict = {'mask':mask}
-    return Matrix(mask.sds_context, 'vectorToCsv', named_input_nodes=params_dict)
+    return Matrix(mask.sds_context,
+		'vectorToCsv',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/winsorize.py b/src/main/python/systemds/operator/algorithm/builtin/winsorize.py
index eacaa28..6133e75 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/winsorize.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/winsorize.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def winsorize(X: OperationNode, verbose: bool):
     
     params_dict = {'X':X, 'verbose':verbose}
-    return Matrix(X.sds_context, 'winsorize', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'winsorize',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py b/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py
index d677320..b2fcbbf 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py
@@ -24,14 +24,16 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def xdummy1(X: OperationNode):
     
     params_dict = {'X':X}
-    return Matrix(X.sds_context, 'xdummy1', named_input_nodes=params_dict)
+    return Matrix(X.sds_context,
+		'xdummy1',
+		named_input_nodes=params_dict)
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py b/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py
index a5d75f4..d91b1c9 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py
@@ -24,14 +24,24 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 def xdummy2(X: OperationNode):
     
     params_dict = {'X':X}
-    return OperationNode(X.sds_context, 'xdummy2', named_input_nodes=params_dict, output_type=OutputType.LIST, number_of_outputs=2, output_types=[OutputType.MATRIX, OutputType.MATRIX])
+    
+    vX_0 = Matrix(X.sds_context, '')
+    vX_1 = Matrix(X.sds_context, '')
+    output_nodes = [vX_0, vX_1, ]
+
+    op = MultiReturn(X.sds_context, 'xdummy2', output_nodes, named_input_nodes=params_dict)
+
+    vX_0._unnamed_input_nodes = [op]
+    vX_1._unnamed_input_nodes = [op]
+
+    return op
 
 
     
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/nodes/frame.py b/src/main/python/systemds/operator/nodes/frame.py
index 0beb05f..9c7d204 100644
--- a/src/main/python/systemds/operator/nodes/frame.py
+++ b/src/main/python/systemds/operator/nodes/frame.py
@@ -89,8 +89,8 @@ class Frame(OperationNode):
         
         frame = Frame(self.sds_context,"")
         matrix = Matrix(self.sds_context,"")
-
         output_nodes = [matrix,frame]
+        
         op = MultiReturn(
             self.sds_context,
             "transformencode",
diff --git a/src/main/python/systemds/operator/operation_node.py b/src/main/python/systemds/operator/operation_node.py
index f3e295d..8dba0f9 100644
--- a/src/main/python/systemds/operator/operation_node.py
+++ b/src/main/python/systemds/operator/operation_node.py
@@ -92,7 +92,6 @@ class OperationNode(DAGNode):
                 print("SCRIPT:")
                 print(self._script.dml_script)
 
-
             if lineage:
                 result_variables, self._lineage_trace = self._script.execute_with_lineage()
             else:
@@ -115,7 +114,11 @@ class OperationNode(DAGNode):
             return self._result_var
 
     def _parse_output_result_variables(self, result_variables):
-        raise NotImplementedError("This method should be overwritten by subclasses")
+        if self._output_type == None or self._output_type == OutputType.NONE:
+            return None
+        else:
+            raise NotImplementedError(
+                "This method should be overwritten by subclasses")
 
     def get_lineage_trace(self) -> str:
         """Get the lineage trace for this node.
diff --git a/src/main/python/tests/frame/test_transform_encode.py b/src/main/python/tests/frame/test_transform_encode.py
index 70b1605..5159a61 100644
--- a/src/main/python/tests/frame/test_transform_encode.py
+++ b/src/main/python/tests/frame/test_transform_encode.py
@@ -81,8 +81,9 @@ class TestTransformEncode(unittest.TestCase):
         )
         jspec = self.sds.read(self.JSPEC_PATH, data_type="scalar", value_type="string")
         X, M = F1.transform_encode(spec=jspec)
-        xm = X + 1
-        res = xm.compute(verbose=True)
+        xm = X.sum() + 1
+        res = xm.compute()
+        self.assertTrue(isinstance(res,float))
 
 if __name__ == "__main__":
     unittest.main(exit=False)

[systemds] 02/04: [SYSTEMDS-2828] Python Multi Return Integration

Posted by ba...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git

commit 6b885a08fec0f1e07964c5e733f87fb438eb1ed6
Author: baunsgaard <ba...@tugraz.at>
AuthorDate: Wed Jun 2 22:03:14 2021 +0200

    [SYSTEMDS-2828] Python Multi Return Integration
    
    This commit fixes interation of the multi return pr,
    this is done by adding a few extra node classes to reflect the
    difference between multi returns from functions and lists.
    Support for both is added in this commit, but the generator script
    does not comply with the changes
---
 .../python/systemds/context/systemds_context.py    |  15 +--
 src/main/python/systemds/operator/__init__.py      |   6 +-
 src/main/python/systemds/operator/nodes/frame.py   |  34 ++++---
 src/main/python/systemds/operator/nodes/list.py    |  70 +++++++-------
 .../python/systemds/operator/nodes/list_access.py  |  63 ++++++++++++
 src/main/python/systemds/operator/nodes/matrix.py  |  38 +++++---
 .../python/systemds/operator/nodes/multi_return.py |  85 +++++++++++++++++
 src/main/python/systemds/operator/nodes/scalar.py  |  20 ++--
 src/main/python/systemds/operator/nodes/source.py  |   9 +-
 .../python/systemds/operator/operation_node.py     | 103 +++-----------------
 src/main/python/systemds/script_building/dag.py    |   2 +
 src/main/python/systemds/script_building/script.py |  34 +++++--
 .../python/tests/frame/test_transform_encode.py    |  15 +++
 .../{systemds/operator => tests/list}/__init__.py  |  10 --
 .../__init__.py => tests/list/return_list.dml}     |  19 ++--
 .../test_list.py}                                  |  41 ++++++--
 .../test_list_unknown.py}                          |  31 ++++--
 src/main/python/tests/list/test_operations.py      | 106 ---------------------
 .../python/tests/source/test_source_neural_net.py  |  17 ++--
 19 files changed, 378 insertions(+), 340 deletions(-)

diff --git a/src/main/python/systemds/context/systemds_context.py b/src/main/python/systemds/context/systemds_context.py
index 80db697..8a2ebd6 100644
--- a/src/main/python/systemds/context/systemds_context.py
+++ b/src/main/python/systemds/context/systemds_context.py
@@ -446,7 +446,7 @@ class SystemDSContext(object):
         The importing is done thorugh the DML command source, and adds all defined methods from
         the script to the Source object returned in python. This gives the flexibility to call the methods 
         directly on the object returned.
-    
+
         In systemds a method called func_01 can then be imported using
 
         ```python
@@ -460,15 +460,4 @@ class SystemDSContext(object):
         return Source(self, path, name, print_imported_methods)
 
     def list(self, *args: Sequence[VALID_INPUT_TYPES], **kwargs: Dict[str, VALID_INPUT_TYPES]) -> 'List':
-        if len(kwargs) != 0 and len(args) != 0:
-            raise Exception("Accepts either args or kwargs")
-        elif len(kwargs) != 0:
-            out = []
-            for key, arg in kwargs.items():
-                out.append((key, OutputType.from_type(arg)))
-            return List(self, 'list', named_input_nodes=kwargs, outputs=out)
-        elif len(args) != 0:
-            out = []
-            for idx, arg in enumerate(args):
-                out.append((f"_{idx}", OutputType.from_type(arg)))
-            return List(self, 'list', unnamed_input_nodes=args, outputs=out)
+        return List(self, unnamed_input_nodes=args, named_input_nodes=kwargs)
diff --git a/src/main/python/systemds/operator/__init__.py b/src/main/python/systemds/operator/__init__.py
index cda9ba2..ebdb6ee 100644
--- a/src/main/python/systemds/operator/__init__.py
+++ b/src/main/python/systemds/operator/__init__.py
@@ -20,11 +20,13 @@
 # -------------------------------------------------------------
 
 from systemds.operator.operation_node import OperationNode
+from systemds.operator.nodes.multi_return import MultiReturn
 from systemds.operator.nodes.scalar import Scalar
 from systemds.operator.nodes.matrix import Matrix
 from systemds.operator.nodes.frame import Frame
-from systemds.operator.nodes.source import Source
+from systemds.operator.nodes.list_access import ListAccess
 from systemds.operator.nodes.list import List
+from systemds.operator.nodes.source import Source
 from systemds.operator import algorithm
 
-__all__ = [OperationNode, algorithm, Scalar, List, Matrix, Frame, Source]
+__all__ = [OperationNode, algorithm, Scalar, List, ListAccess, Matrix, Frame, Source, MultiReturn]
diff --git a/src/main/python/systemds/operator/nodes/frame.py b/src/main/python/systemds/operator/nodes/frame.py
index 2b38065..0beb05f 100644
--- a/src/main/python/systemds/operator/nodes/frame.py
+++ b/src/main/python/systemds/operator/nodes/frame.py
@@ -27,9 +27,9 @@ from typing import Dict, Optional, Sequence, Tuple, Union, TYPE_CHECKING, Iterab
 import numpy as np
 import pandas as pd
 from py4j.java_gateway import JavaObject, JVMView
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, Matrix, MultiReturn
 from systemds.utils.consts import VALID_INPUT_TYPES
-from systemds.utils.converters import pandas_to_frame_block
+from systemds.utils.converters import pandas_to_frame_block, frame_block_to_pandas
 from systemds.script_building.dag import OutputType, DAGNode
 
 if TYPE_CHECKING:
@@ -78,20 +78,31 @@ class Frame(OperationNode):
         else:
             return super().compute(verbose, lineage)
 
+    def _parse_output_result_variables(self, result_variables):
+        return frame_block_to_pandas(self.sds_context, result_variables.getFrameBlock(self._script.out_var_name[0]))
+
     def _is_pandas(self) -> bool:
         return self._pd_dataframe is not None
 
     def transform_encode(self, spec: "Scalar"):
         params_dict = {"target": self, "spec": spec}
-        return OperationNode(
+        
+        frame = Frame(self.sds_context,"")
+        matrix = Matrix(self.sds_context,"")
+
+        output_nodes = [matrix,frame]
+        op = MultiReturn(
             self.sds_context,
             "transformencode",
+            output_nodes,
             named_input_nodes=params_dict,
-            output_type=OutputType.LIST,
-            number_of_outputs=2,
-            output_types=[OutputType.MATRIX, OutputType.FRAME],
         )
 
+        frame._unnamed_input_nodes = [op]
+        matrix._unnamed_input_nodes = [op]
+
+        return op
+
     def transform_apply(self, spec: "Scalar", meta: "Frame"):
         params_dict = {"target": self, "spec": spec, "meta": meta}
         return Matrix(self.sds_context, "transformapply", named_input_nodes=params_dict)
@@ -103,7 +114,7 @@ class Frame(OperationNode):
         :return: The OperationNode containing the concatenated frames.
         """
 
-        return Frame(self.sds_context, "rbind",[self, other])
+        return Frame(self.sds_context, "rbind", [self, other])
 
     def cbind(self, other) -> 'Frame':
         """
@@ -111,12 +122,5 @@ class Frame(OperationNode):
         :param: The other frame to bind to the right hand side.
         :return: The OperationNode containing the concatenated frames.
         """
-        return Frame(self.sds_context,"cbind",[self, other])
-
-    def t(self) -> 'OperationNode':
-        """ Transposes the input
-
-        :return: the OperationNode representing this operation
-        """
+        return Frame(self.sds_context, "cbind", [self, other])
 
-        return Frame(self.sds_context, 't', [self])
diff --git a/src/main/python/systemds/operator/nodes/list.py b/src/main/python/systemds/operator/nodes/list.py
index 64e37eb..90e2e90 100644
--- a/src/main/python/systemds/operator/nodes/list.py
+++ b/src/main/python/systemds/operator/nodes/list.py
@@ -26,7 +26,7 @@ from typing import Dict, Sequence, Tuple, Union, Iterable, List
 import numpy as np
 from py4j.java_gateway import JavaObject
 
-from systemds.operator import OperationNode, Matrix
+from systemds.operator import OperationNode, ListAccess
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 from systemds.utils.converters import numpy_to_matrix_block
@@ -35,26 +35,39 @@ from systemds.utils.helpers import create_params_string
 
 class List(OperationNode):
 
-    def __init__(self, sds_context: 'SystemDSContext', operation: str,
-                 unnamed_input_nodes: Union[str, Iterable[VALID_INPUT_TYPES]] = None,
-                 named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None,
-                 outputs: List[Tuple[str, OutputType]] = [("_1", OutputType.MATRIX)]):
+    def __init__(self, sds_context: 'SystemDSContext', func='list',
+                 unnamed_input_nodes: Union[str,
+                                            Iterable[VALID_INPUT_TYPES]] = None,
+                 named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None):
 
-        is_python_local_data = False
-        self._outputs = outputs
-        self._named_output_nodes = {}
-        for idx, output in enumerate(outputs):
-            if output[1] == OutputType.MATRIX:
-                self.named_output_nodes[output[0]] = Matrix(sds_context, operation='list', named_input_nodes={f"_{idx}": self})
-                # TODO add output types
+        named = named_input_nodes != None and len(named_input_nodes) != 0
+        unnamed = unnamed_input_nodes != None and len(unnamed_input_nodes) != 0
+        if func == "list":
+            if named and unnamed:
+                raise ValueError(
+                    "A List cannot both contain named and unamed variables")
+            elif unnamed:
+                self._outputs = []
+                for v in unnamed_input_nodes:
+                    self._outputs.append(v)
+            else:
+                self._outputs = {}
+                for idx, v in named_input_nodes:
+                    self._outputs[idx] = v
+        else:
+            # Initialize the outputs as an empty list, and populate it when items are requested.
+            self._outputs = {}
 
-        super().__init__(sds_context, operation, unnamed_input_nodes,
-                         named_input_nodes, OutputType.LIST, is_python_local_data)
+        super().__init__(sds_context, func, unnamed_input_nodes,
+                         named_input_nodes, OutputType.LIST, False)
 
     def __getitem__(self, key):
-        if isinstance(key, int):
-            return self.named_output_nodes[self._outputs[key][0]]
-        return self.named_output_nodes[key]
+        if key in self._outputs:
+            return self._outputs[key]
+        else:
+            ent = ListAccess(self.sds_context, self, key)
+            self._outputs[key] = ent
+            return ent
 
     def pass_python_data_to_prepared_script(self, sds, var_name: str, prepared_script: JavaObject) -> None:
         assert self.is_python_local_data, 'Can only pass data to prepared script if it is python local!'
@@ -62,27 +75,12 @@ class List(OperationNode):
             prepared_script.setMatrix(var_name, numpy_to_matrix_block(
                 sds, self._np_array), True)  # True for reuse
 
-    def __parse_output_result_list(self, result_variables):
-        result_var = []
-        named_output_nodes_types_list = [type(named_output_node).__name__ for named_output_node in list(self.named_output_nodes.values())]
-        for idx, v in enumerate(self._script.out_var_name):
-            if named_output_nodes_types_list[idx] == "Matrix":
-                result_var.append(self.__parse_output_result_matrix(result_variables, v))
-            elif named_output_nodes_types_list[idx] == "Frame":
-                result_var.append(self.__parse_output_result_frame(result_variables, v))
-            else:
-                result_var.append(result_variables.getDouble(self._script.out_var_name[idx]))
-        return result_var
-
     def code_line(self, var_name: str, unnamed_input_vars: Sequence[str],
                   named_input_vars: Dict[str, str]) -> str:
-
-        inputs_comma_sep = create_params_string(unnamed_input_vars, named_input_vars)
-        output = "["
-        for idx, output_node in enumerate(self.named_output_nodes):
-            output += f'{var_name}_{idx},'
-        output = output[:-1] + "]"
-        return f'{output}={self.operation}({inputs_comma_sep});'
+        inputs_comma_sep = create_params_string(
+            unnamed_input_vars, named_input_vars)
+        return f'{var_name}={self.operation}({inputs_comma_sep});'
 
     def compute(self, verbose: bool = False, lineage: bool = False) -> Union[np.array]:
         return super().compute(verbose, lineage)
+
diff --git a/src/main/python/systemds/operator/nodes/list_access.py b/src/main/python/systemds/operator/nodes/list_access.py
new file mode 100644
index 0000000..869377f
--- /dev/null
+++ b/src/main/python/systemds/operator/nodes/list_access.py
@@ -0,0 +1,63 @@
+# -------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# -------------------------------------------------------------
+
+__all__ = ["ListAccess"]
+
+from typing import Dict, Sequence, Tuple, Union, Iterable
+
+import numpy as np
+from py4j.java_gateway import JavaObject
+
+from systemds.operator import OperationNode, Matrix, Frame, Scalar
+from systemds.script_building.dag import OutputType
+
+
+class ListAccess(OperationNode):
+
+    def __init__(self, sds_context: 'SystemDSContext', list_source: 'List', key):
+        self._key = key
+        self._list_source = list_source
+
+        inputs = [list_source]
+        super().__init__(sds_context, None, unnamed_input_nodes=inputs,
+                         output_type=OutputType.UNKNOWN, is_python_local_data=False)
+
+    def code_line(self, var_name: str, unnamed_input_vars: Sequence[str],
+                  named_input_vars: Dict[str, str]) -> str:
+        return f'{var_name}={self._list_source._dml_name}[{self._key}];'
+
+    def as_matrix(self) -> Matrix:
+        ent = self._list_source[self._key]
+        res = Matrix(self.sds_context, "as.matrix", [ent])
+        self._list_source._outputs[self._key] = res
+        return res
+    
+    def as_frame(self) -> Frame:
+        ent = self._list_source[self._key]
+        res = Frame(self.sds_context, "as.frame", [ent])
+        self._list_source._outputs[self._key] = res
+        return res
+
+    def as_scalar(self) -> Scalar:
+        ent = self._list_source[self._key]
+        res = Scalar(self.sds_context, "as.scalar", [ent])
+        self._list_source._outputs[self._key] = res
+        return res
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/nodes/matrix.py b/src/main/python/systemds/operator/nodes/matrix.py
index 7a96499..e1322d4 100644
--- a/src/main/python/systemds/operator/nodes/matrix.py
+++ b/src/main/python/systemds/operator/nodes/matrix.py
@@ -28,16 +28,18 @@ import numpy as np
 from py4j.java_gateway import JavaObject, JVMView
 from systemds.operator import OperationNode, Scalar
 from systemds.utils.consts import VALID_INPUT_TYPES
-from systemds.utils.converters import numpy_to_matrix_block
+from systemds.utils.converters import numpy_to_matrix_block, matrix_block_to_numpy
 from systemds.script_building.dag import OutputType
 
 from systemds.utils.consts import VALID_INPUT_TYPES, BINARY_OPERATIONS, VALID_ARITHMETIC_TYPES
 
+
 class Matrix(OperationNode):
     _np_array: np.array
 
     def __init__(self, sds_context: 'SystemDSContext', operation: str,
-                 unnamed_input_nodes: Union[str,Iterable[VALID_INPUT_TYPES]] = None,
+                 unnamed_input_nodes: Union[str,
+                                            Iterable[VALID_INPUT_TYPES]] = None,
                  named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None,
                  local_data: np.array = None) -> 'Matrix':
 
@@ -72,6 +74,10 @@ class Matrix(OperationNode):
         else:
             return super().compute(verbose, lineage)
 
+    def _parse_output_result_variables(self, result_variables):
+        return matrix_block_to_numpy(self.sds_context.java_gateway.jvm,
+                                     result_variables.getMatrixBlock(self._script.out_var_name[0]))
+
     def _is_numpy(self) -> bool:
         return self._np_array is not None
 
@@ -146,7 +152,7 @@ class Matrix(OperationNode):
     def __matmul__(self, other: 'Matrix') -> 'Matrix':
         return Matrix(self.sds_context, '%*%', [self, other])
 
-    def sum(self, axis: int = None) -> 'Matrix':
+    def sum(self, axis: int = None) -> 'OperationNode':
         """Calculate sum of matrix.
 
         :param axis: can be 0 or 1 to do either row or column sums
@@ -161,7 +167,7 @@ class Matrix(OperationNode):
         raise ValueError(
             f"Axis has to be either 0, 1 or None, for column, row or complete {self.operation}")
 
-    def mean(self, axis: int = None) -> 'Matrix':
+    def mean(self, axis: int = None) -> 'OperationNode':
         """Calculate mean of matrix.
 
         :param axis: can be 0 or 1 to do either row or column means
@@ -176,7 +182,7 @@ class Matrix(OperationNode):
         raise ValueError(
             f"Axis has to be either 0, 1 or None, for column, row or complete {self.operation}")
 
-    def var(self, axis: int = None) -> 'Matrix':
+    def var(self, axis: int = None) -> 'OperationNode':
         """Calculate variance of matrix.
 
         :param axis: can be 0 or 1 to do either row or column vars
@@ -268,7 +274,7 @@ class Matrix(OperationNode):
         unnamed_inputs.append(moment)
         return Matrix(self.sds_context, 'moment', unnamed_inputs, output_type=OutputType.DOUBLE)
 
-    def cholesky(self, safe: bool = False) -> 'OperationNode':
+    def cholesky(self, safe: bool = False) -> 'Matrix':
         """ Computes the Cholesky decomposition of a symmetric, positive definite matrix
 
         :param safe: default value is False, if flag is True additional checks to ensure
@@ -277,7 +283,7 @@ class Matrix(OperationNode):
         """
         return Matrix(self.sds_context, 'cholesky', [self])
 
-    def to_one_hot(self, num_classes: int) -> 'OperationNode':
+    def to_one_hot(self, num_classes: int) -> 'Matrix':
         """ OneHot encode the matrix.
 
         It is assumed that there is only one column to encode, and all values are whole numbers > 0
@@ -307,7 +313,7 @@ class Matrix(OperationNode):
         """
         return Matrix(self.sds_context, "cbind", [self, other])
 
-    def t(self) -> 'OperationNode':
+    def t(self) -> 'Matrix':
         """ Transposes the input
 
         :return: the OperationNode representing this operation
@@ -315,7 +321,7 @@ class Matrix(OperationNode):
         return Matrix(self.sds_context, 't', [self])
 
     def order(self, by: int = 1, decreasing: bool = False,
-              index_return: bool = False) -> 'OperationNode':
+              index_return: bool = False) -> 'Matrix':
         """ Sort by a column of the matrix X in increasing/decreasing order and returns either the index or data
 
         :param by: sort matrix by this column number
@@ -327,10 +333,18 @@ class Matrix(OperationNode):
         named_input_nodes = {'target': self, 'by': by, 'decreasing': str(decreasing).upper(),
                              'index.return': str(index_return).upper()}
 
-        return OperationNode(self.sds_context, 'order', [], named_input_nodes=named_input_nodes)
+        return Matrix(self.sds_context, 'order', [], named_input_nodes=named_input_nodes)
 
-    def to_string(self, **kwargs: Dict[str, VALID_INPUT_TYPES]) -> 'OperationNode':
+    def to_string(self, **kwargs: Dict[str, VALID_INPUT_TYPES]) -> 'Matrix':
         """ Converts the input to a string representation.
         :return: `Scalar` containing the string.
         """
-        return Scalar(self.sds_context, 'toString', [self], kwargs, output_type=OutputType.STRING)
\ No newline at end of file
+        return Scalar(self.sds_context, 'toString', [self], kwargs, output_type=OutputType.STRING)
+
+    def rev(self) -> 'Matrix':
+        """ Reverses the rows
+
+        :return: the OperationNode representing this operation
+        """
+        return Matrix(self.sds_context, 'rev', [self])
+
diff --git a/src/main/python/systemds/operator/nodes/multi_return.py b/src/main/python/systemds/operator/nodes/multi_return.py
new file mode 100644
index 0000000..c14a7b0
--- /dev/null
+++ b/src/main/python/systemds/operator/nodes/multi_return.py
@@ -0,0 +1,85 @@
+# -------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# -------------------------------------------------------------
+
+__all__ = ["MultiReturn"]
+
+from typing import Dict, Sequence, Tuple, Union, Iterable, List
+
+import numpy as np
+from py4j.java_gateway import JavaObject
+
+from systemds.operator import OperationNode
+from systemds.script_building.dag import OutputType
+from systemds.utils.consts import VALID_INPUT_TYPES
+from systemds.utils.converters import matrix_block_to_numpy,frame_block_to_pandas
+from systemds.utils.helpers import create_params_string
+
+
+class MultiReturn(OperationNode):
+
+    def __init__(self, sds_context: 'SystemDSContext', operation,
+                 output_nodes: List[OperationNode],
+                 unnamed_input_nodes: Union[str,
+                                            Iterable[VALID_INPUT_TYPES]] = None,
+                 named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None):
+
+        self._outputs = output_nodes
+
+        super().__init__(sds_context, operation, unnamed_input_nodes,
+                         named_input_nodes, OutputType.MULTI_RETURN, False)
+
+    def __getitem__(self, key):
+        self._outputs[key]
+
+    def code_line(self, var_name: str, unnamed_input_vars: Sequence[str],
+                  named_input_vars: Dict[str, str]) -> str:
+
+        inputs_comma_sep = create_params_string(
+            unnamed_input_vars, named_input_vars)
+        output = "["
+        for idx, output_node in enumerate(self._outputs):
+            name = f'{var_name}_{idx}'
+            output_node.dml_name = name
+            output += f'{name},'
+
+        output = output[:-1] + "]"
+
+        return f'{output}={self.operation}({inputs_comma_sep});'
+
+    def _parse_output_result_variables(self, result_variables):
+        result_var = []
+        jvmV = self.sds_context.java_gateway.jvm
+        for idx, v in enumerate(self._script.out_var_name):
+            out_type =self._outputs[idx].output_type
+            if out_type == OutputType.MATRIX:
+                result_var.append(
+                    matrix_block_to_numpy(jvmV, result_variables.getMatrixBlock(v)))
+            elif out_type == OutputType.FRAME:
+                result_var.append(
+                    frame_block_to_pandas(jvmV, result_variables.getFrameBlock(v)))
+            elif out_type == OutputType.DOUBLE:
+                result_var.append(result_variables.getDouble(v))
+            else:
+                raise NotImplementedError("Not Implemented Support of type" + out_type)
+        return result_var
+
+    def __iter__(self):
+        return iter(self._outputs)
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/nodes/scalar.py b/src/main/python/systemds/operator/nodes/scalar.py
index d3b0446..cd27d30 100644
--- a/src/main/python/systemds/operator/nodes/scalar.py
+++ b/src/main/python/systemds/operator/nodes/scalar.py
@@ -34,21 +34,21 @@ from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES, BINARY_OPERATIONS, VALID_ARITHMETIC_TYPES
 
 
-
 class Scalar(OperationNode):
-    __assign : bool
+    __assign: bool
 
     def __init__(self, sds_context: 'SystemDSContext', operation: str,
                  unnamed_input_nodes: Iterable[VALID_INPUT_TYPES] = None,
                  named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None,
-                 output_type : OutputType = OutputType.DOUBLE,
-                 assign : bool = False) -> 'Scalar':
+                 output_type: OutputType = OutputType.DOUBLE,
+                 assign: bool = False) -> 'Scalar':
         self.__assign = assign
         super().__init__(sds_context, operation, unnamed_input_nodes=unnamed_input_nodes,
                          named_input_nodes=named_input_nodes, output_type=output_type)
 
     def pass_python_data_to_prepared_script(self, sds, var_name: str, prepared_script: JavaObject) -> None:
-        raise RuntimeError('Scalar Operation Nodes, should not have python data input')
+        raise RuntimeError(
+            'Scalar Operation Nodes, should not have python data input')
 
     def code_line(self, var_name: str, unnamed_input_vars: Sequence[str],
                   named_input_vars: Dict[str, str]) -> str:
@@ -60,6 +60,14 @@ class Scalar(OperationNode):
     def compute(self, verbose: bool = False, lineage: bool = False) -> Union[np.array]:
         return super().compute(verbose, lineage)
 
+    def _parse_output_result_variables(self, result_variables):
+        if self.output_type == OutputType.DOUBLE:
+            return result_variables.getDouble(self._script.out_var_name[0])
+        elif self.output_type == OutputType.STRING:
+            return result_variables.getString(self._script.out_var_name[0])
+        else:
+            raise NotImplemented("Not currently support scalar type: " + self.output_type)
+
     def __add__(self, other: VALID_ARITHMETIC_TYPES) -> 'Scalar':
         return Scalar(self.sds_context, '+', [self, other])
 
@@ -214,4 +222,4 @@ class Scalar(OperationNode):
         """ Converts the input to a string representation.
         :return: `Scalar` containing the string.
         """
-        return Scalar(self.sds_context, 'toString', [self], kwargs, output_type=OutputType.STRING)
\ No newline at end of file
+        return Scalar(self.sds_context, 'toString', [self], named_input_nodes=kwargs, output_type=OutputType.STRING)
diff --git a/src/main/python/systemds/operator/nodes/source.py b/src/main/python/systemds/operator/nodes/source.py
index 28853b5..46e1799 100644
--- a/src/main/python/systemds/operator/nodes/source.py
+++ b/src/main/python/systemds/operator/nodes/source.py
@@ -26,7 +26,7 @@ from typing import (TYPE_CHECKING, Dict, Iterable, Optional, Sequence, Tuple,
                     Union)
 
 import numpy as np
-from systemds.operator import Matrix, OperationNode, Scalar
+from systemds.operator import Matrix, OperationNode, Scalar, List
 from systemds.script_building.dag import OutputType
 
 
@@ -106,7 +106,7 @@ class Func(object):
         elif var_l[0] == 'b':  # boolean
             return (self.split_to_value_and_def(var[7:], True), 'Scalar')
         elif var_l[0] == 'l': # list[unknown]
-            return (self.split_to_value_and_def(var[13:]), 'OperationNode')
+            return (self.split_to_value_and_def(var[13:]), 'List')
         elif var_l[0] == 's': # string
             return (self.split_to_value_and_def(var[6:]), 'Scalar')
         else:
@@ -135,17 +135,12 @@ class Source(OperationNode):
                          f'"{path}"', output_type=OutputType.IMPORT)
         self.__name = name
         functions = self.__parse_functions_from_script(path)
-        # if print_imported_methods:
-        #     current_functions = set(dir(self))
 
         # Add all the functions found in the source file to this object.
         for id, f in enumerate(functions):
             func = f.get_func(sds_context, name, id, print_imported_methods)
             setattr(self, f._name, MethodType(func, self))
 
-        # if print_imported_methods:
-        #     print(set(dir(self)) - current_functions)
-
     def __parse_functions_from_script(self, path: str) -> Iterable[Func]:
         lines = self.__parse_lines_with_filter(path)
         functions = []
diff --git a/src/main/python/systemds/operator/operation_node.py b/src/main/python/systemds/operator/operation_node.py
index 6dcd56c..f3e295d 100644
--- a/src/main/python/systemds/operator/operation_node.py
+++ b/src/main/python/systemds/operator/operation_node.py
@@ -19,17 +19,17 @@
 #
 # -------------------------------------------------------------
 
-from typing import Union, Optional, Iterable, Dict, Sequence, Tuple, TYPE_CHECKING
 from multiprocessing import Process
+from typing import (TYPE_CHECKING, Dict, Iterable, Optional, Sequence, Tuple,
+                    Union)
 
 import numpy as np
-from py4j.java_gateway import JVMView, JavaObject
-
-from systemds.utils.consts import VALID_INPUT_TYPES, BINARY_OPERATIONS, VALID_ARITHMETIC_TYPES
-from systemds.utils.helpers import create_params_string
-from systemds.utils.converters import matrix_block_to_numpy, frame_block_to_pandas
+from py4j.java_gateway import JavaObject, JVMView
+from systemds.script_building.dag import DAGNode, OutputType
 from systemds.script_building.script import DMLScript
-from systemds.script_building.dag import OutputType, DAGNode
+from systemds.utils.consts import (BINARY_OPERATIONS, VALID_ARITHMETIC_TYPES,
+                                   VALID_INPUT_TYPES)
+from systemds.utils.helpers import create_params_string
 
 if TYPE_CHECKING:
     # to avoid cyclic dependencies during runtime
@@ -44,14 +44,13 @@ class OperationNode(DAGNode):
     _script: Optional[DMLScript]
     _output_types: Optional[Iterable[VALID_INPUT_TYPES]]
     _source_node: Optional["DAGNode"]
-    
+
     def __init__(self, sds_context: 'SystemDSContext', operation: str,
                  unnamed_input_nodes: Union[str,
                                             Iterable[VALID_INPUT_TYPES]] = None,
                  named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None,
                  output_type: OutputType = OutputType.MATRIX,
                  is_python_local_data: bool = False):
-                 
         """
         Create general `OperationNode`
 
@@ -93,13 +92,14 @@ class OperationNode(DAGNode):
                 print("SCRIPT:")
                 print(self._script.dml_script)
 
+
             if lineage:
                 result_variables, self._lineage_trace = self._script.execute_with_lineage()
             else:
                 result_variables = self._script.execute()
 
             if result_variables is not None:
-                self._result_var = self.__parse_output_result_variables(
+                self._result_var = self._parse_output_result_variables(
                     result_variables)
 
         if verbose:
@@ -108,32 +108,14 @@ class OperationNode(DAGNode):
             for y in self.sds_context.get_stderr():
                 print(y)
 
+        self._script.clear(self)
         if lineage:
             return self._result_var, self._lineage_trace
         else:
             return self._result_var
 
-    def __parse_output_result_variables(self, result_variables):
-        if self.output_type == OutputType.DOUBLE:
-            return self.__parse_output_result_double(result_variables, self._script.out_var_name[0])
-        elif self.output_type == OutputType.MATRIX:
-            return self.__parse_output_result_matrix(result_variables, self._script.out_var_name[0])
-        elif self.output_type == OutputType.LIST:
-            return self.__parse_output_result_list(result_variables)
-        elif self.output_type == OutputType.FRAME:
-            return self.__parse_output_result_frame(result_variables, self._script.out_var_name[0])
-
-    def __parse_output_result_double(self, result_variables, var_name):
-        return result_variables.getDouble(var_name)
-
-    def __parse_output_result_matrix(self, result_variables, var_name):
-        return matrix_block_to_numpy(self.sds_context.java_gateway.jvm,
-                                     result_variables.getMatrixBlock(var_name))
-
-    def __parse_output_result_frame(self, result_variables, var_name):
-        return frame_block_to_pandas(
-            self.sds_context, result_variables.getFrameBlock(var_name)
-        )
+    def _parse_output_result_variables(self, result_variables):
+        raise NotImplementedError("This method should be overwritten by subclasses")
 
     def get_lineage_trace(self) -> str:
         """Get the lineage trace for this node.
@@ -156,12 +138,11 @@ class OperationNode(DAGNode):
                 unnamed_input_vars) == 2, 'Binary Operations need exactly two input variables'
             return f'{var_name}={unnamed_input_vars[0]}{self.operation}{unnamed_input_vars[1]}'
 
-        inputs_comma_sep = create_params_string(unnamed_input_vars, named_input_vars)
+        inputs_comma_sep = create_params_string(
+            unnamed_input_vars, named_input_vars)
 
         if self.output_type == OutputType.NONE:
             return f'{self.operation}({inputs_comma_sep});'
-        # elif self.output_type == OutputType.ASSIGN:
-        #     return f'{var_name}={self.operation};'
         else:
             return f'{var_name}={self.operation}({inputs_comma_sep});'
 
@@ -169,47 +150,6 @@ class OperationNode(DAGNode):
         raise NotImplementedError(
             'Operation node has no python local data. Missing implementation in derived class?')
 
-    def _check_matrix_op(self):
-        """Perform checks to assure operation is allowed to be performed on data type of this `OperationNode`
-
-        :raise: AssertionError
-        """
-        assert self.output_type == OutputType.MATRIX, f'{self.operation} only supported for matrices'
-
-    def _check_frame_op(self):
-        """Perform checks to assure operation is allowed to be performed on data type of this `OperationNode`
-
-        :raise: AssertionError
-        """
-        assert self.output_type == OutputType.FRAME, f'{self.operation} only supported for frames'
-
-    def _check_matrix_or_frame_op(self):
-        """Perform checks to assure operation is allowed to be performed on data type of this `OperationNode`
-
-        :raise: AssertionError
-        """
-        assert (
-            self.output_type == OutputType.FRAME
-            or self.output_type == OutputType.MATRIX
-        ), f"{self.operation} only supported for frames or matrices"
-
-    def _check_equal_op_type_as(self, other: "OperationNode"):
-        """Perform checks to assure operation is equal to 'other'. Used for rBind and cBind type equality check.
-
-        :raise: AssertionError
-        """
-        assert (
-            self.output_type == other.output_type
-        ), f"{self.operation} only supported for Nodes of equal output-type. Got self: {self.output_type} and other: {other.output_type}"
-
-    def _check_other(self, other: "OperationNode", expectedOutputType: OutputType):
-        """Perform check to assure other operation has expected output type.
-
-        :raise: AssertionError
-        """
-        assert other.output_type == expectedOutputType, "not correctly asserted output types expected: " + \
-            str(expectedOutputType) + " got " + str(other.output_type)
-
     def write(self, destination: str, format: str = "binary", **kwargs: Dict[str, VALID_INPUT_TYPES]) -> 'OperationNode':
         """ Write input to disk. 
         The written format is easily read by SystemDSContext.read(). 
@@ -230,16 +170,3 @@ class OperationNode(DAGNode):
         To get the returned string look at the stdout of SystemDSContext.
         """
         return OperationNode(self.sds_context, 'print', [self], kwargs, output_type=OutputType.NONE)
-
-    def rev(self) -> 'OperationNode':
-        """ Reverses the rows
-
-        :return: the OperationNode representing this operation
-        """
-        return OperationNode(self.sds_context, 'rev', [self])
-
-    def to_string(self, **kwargs: Dict[str, VALID_INPUT_TYPES]) -> 'OperationNode':
-        """ Converts the input to a string representation.
-        :return: `Scalar` containing the string.
-        """
-        return OperationNode(self.sds_context, 'toString', [self], kwargs, output_type=OutputType.STRING)
\ No newline at end of file
diff --git a/src/main/python/systemds/script_building/dag.py b/src/main/python/systemds/script_building/dag.py
index 2ca2e8f..f156b6c 100644
--- a/src/main/python/systemds/script_building/dag.py
+++ b/src/main/python/systemds/script_building/dag.py
@@ -38,11 +38,13 @@ class OutputType(Enum):
     DOUBLE = auto()
     FRAME = auto()
     LIST = auto()
+    MULTI_RETURN = auto()
     MATRIX = auto()
     NONE = auto()
     SCALAR = auto()
     STRING = auto()
     IMPORT = auto()
+    UNKNOWN = auto()
 
     @staticmethod
     def from_str(label: Union[str, VALID_INPUT_TYPES]):
diff --git a/src/main/python/systemds/script_building/script.py b/src/main/python/systemds/script_building/script.py
index 3eed51c..649e2ab 100644
--- a/src/main/python/systemds/script_building/script.py
+++ b/src/main/python/systemds/script_building/script.py
@@ -35,10 +35,6 @@ if TYPE_CHECKING:
 class DMLScript:
     """DMLScript is the class used to describe our intended behavior in DML. This script can be then executed to
     get the results.
-
-    TODO caching
-
-    TODO rerun with different inputs without recompilation
     """
     sds_context: 'SystemDSContext'
     dml_script: str
@@ -159,9 +155,9 @@ class DMLScript:
         """
         baseOutVarString = self._dfs_dag_nodes(dag_root)
         if dag_root.output_type != OutputType.NONE:
-            if dag_root.output_type == OutputType.LIST:
+            if dag_root.output_type == OutputType.MULTI_RETURN:
                 self.out_var_name = []
-                for idx, output_node in enumerate(dag_root.named_output_nodes):
+                for idx, output_node in enumerate(dag_root._outputs):
                     self.add_code(
                         f'write({baseOutVarString}_{idx}, \'./tmp_{idx}\');')
                     self.out_var_name.append(f'{baseOutVarString}_{idx}')
@@ -169,6 +165,10 @@ class DMLScript:
                 self.out_var_name.append(baseOutVarString)
                 self.add_code(f'write({baseOutVarString}, \'./tmp\');')
 
+    def clear(self, dag_root: DAGNode):
+        self._dfs_clear_dag_nodes(dag_root)
+        self._variable_counter = 0
+
     def _dfs_dag_nodes(self, dag_node: VALID_INPUT_TYPES) -> str:
         """Uses Depth-First-Search to create code from DAG
 
@@ -180,6 +180,8 @@ class DMLScript:
                 return 'TRUE' if dag_node else 'FALSE'
             return str(dag_node)
 
+        # If the node already have a name then it is already defined
+        # in the script, therefore reuse.
         if dag_node.dml_name != "":
             return dag_node.dml_name
 
@@ -193,7 +195,8 @@ class DMLScript:
         # for each node do the dfs operation and save the variable names in `input_var_names`
         # get variable names of unnamed parameters
 
-        unnamed_input_vars = [self._dfs_dag_nodes(input_node) for input_node in dag_node.unnamed_input_nodes]
+        unnamed_input_vars = [self._dfs_dag_nodes(
+            input_node) for input_node in dag_node.unnamed_input_nodes]
 
         named_input_vars = {}
         for name, input_node in dag_node.named_input_nodes.items():
@@ -202,15 +205,30 @@ class DMLScript:
                 dag_node.dml_name = named_input_vars[name] + name
                 return dag_node.dml_name
 
+        # check if the node gets a name after multireturns
+        # If it has, great, return that name
+        if dag_node.dml_name != "":
+            return dag_node.dml_name
+
         dag_node.dml_name = self._next_unique_var()
 
         if dag_node.is_python_local_data:
             self.add_input_from_python(dag_node.dml_name, dag_node)
 
-        code_line = dag_node.code_line(dag_node.dml_name, unnamed_input_vars, named_input_vars)
+        code_line = dag_node.code_line(
+            dag_node.dml_name, unnamed_input_vars, named_input_vars)
         self.add_code(code_line)
         return dag_node.dml_name
 
+    def _dfs_clear_dag_nodes(self, dag_node: VALID_INPUT_TYPES) -> str:
+        if not isinstance(dag_node, DAGNode):
+            return
+        dag_node.dml_name = ""
+        for n in dag_node.unnamed_input_nodes:
+            self._dfs_clear_dag_nodes(n)
+        for name, n in dag_node.named_input_nodes.items():
+            self._dfs_clear_dag_nodes(n)
+
     def _next_unique_var(self) -> str:
         """Gets the next unique variable name
 
diff --git a/src/main/python/tests/frame/test_transform_encode.py b/src/main/python/tests/frame/test_transform_encode.py
index ced3886..70b1605 100644
--- a/src/main/python/tests/frame/test_transform_encode.py
+++ b/src/main/python/tests/frame/test_transform_encode.py
@@ -69,5 +69,20 @@ class TestTransformEncode(unittest.TestCase):
             self.assertTrue(M[col_name].nunique() == pd_F1[col_name].nunique())
 
 
+    def test_encode_recode_and_use_matrix(self):
+        with open(self.JSPEC_PATH) as jspec_file:
+            JSPEC = json.load(jspec_file)
+        F1 = self.sds.read(
+            self.HOMES_PATH,
+            data_type="frame",
+            schema=self.HOMES_SCHEMA,
+            format="csv",
+            header=True,
+        )
+        jspec = self.sds.read(self.JSPEC_PATH, data_type="scalar", value_type="string")
+        X, M = F1.transform_encode(spec=jspec)
+        xm = X + 1
+        res = xm.compute(verbose=True)
+
 if __name__ == "__main__":
     unittest.main(exit=False)
diff --git a/src/main/python/systemds/operator/__init__.py b/src/main/python/tests/list/__init__.py
similarity index 68%
copy from src/main/python/systemds/operator/__init__.py
copy to src/main/python/tests/list/__init__.py
index cda9ba2..e66abb4 100644
--- a/src/main/python/systemds/operator/__init__.py
+++ b/src/main/python/tests/list/__init__.py
@@ -18,13 +18,3 @@
 # under the License.
 #
 # -------------------------------------------------------------
-
-from systemds.operator.operation_node import OperationNode
-from systemds.operator.nodes.scalar import Scalar
-from systemds.operator.nodes.matrix import Matrix
-from systemds.operator.nodes.frame import Frame
-from systemds.operator.nodes.source import Source
-from systemds.operator.nodes.list import List
-from systemds.operator import algorithm
-
-__all__ = [OperationNode, algorithm, Scalar, List, Matrix, Frame, Source]
diff --git a/src/main/python/systemds/operator/__init__.py b/src/main/python/tests/list/return_list.dml
similarity index 59%
copy from src/main/python/systemds/operator/__init__.py
copy to src/main/python/tests/list/return_list.dml
index cda9ba2..cb316e3 100644
--- a/src/main/python/systemds/operator/__init__.py
+++ b/src/main/python/tests/list/return_list.dml
@@ -1,4 +1,4 @@
-# -------------------------------------------------------------
+#-------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -17,14 +17,11 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-# -------------------------------------------------------------
+#-------------------------------------------------------------
 
-from systemds.operator.operation_node import OperationNode
-from systemds.operator.nodes.scalar import Scalar
-from systemds.operator.nodes.matrix import Matrix
-from systemds.operator.nodes.frame import Frame
-from systemds.operator.nodes.source import Source
-from systemds.operator.nodes.list import List
-from systemds.operator import algorithm
-
-__all__ = [OperationNode, algorithm, Scalar, List, Matrix, Frame, Source]
+f = function() return(list[unknown] C){
+    m1 = matrix(1,1,1)
+    m2 = matrix(2,2,2)
+    m3 = matrix(3,3,3)
+    C = list(m1, m2, m3)
+}
\ No newline at end of file
diff --git a/src/main/python/tests/source/test_source_neural_net.py b/src/main/python/tests/list/test_list.py
similarity index 53%
copy from src/main/python/tests/source/test_source_neural_net.py
copy to src/main/python/tests/list/test_list.py
index 07f2e02..ada06c4 100644
--- a/src/main/python/tests/source/test_source_neural_net.py
+++ b/src/main/python/tests/list/test_list.py
@@ -23,11 +23,15 @@ import unittest
 
 import numpy as np
 from systemds.context import SystemDSContext
+from systemds.operator.algorithm import pca
 
-class TestSource_NeuralNet(unittest.TestCase):
+from systemds.operator import List
+from systemds.script_building.dag import OutputType
+
+
+class TestListOperations(unittest.TestCase):
 
     sds: SystemDSContext = None
-    src_path: str = "./tests/source/neural_net_source.dml"
 
     @classmethod
     def setUpClass(cls):
@@ -37,14 +41,31 @@ class TestSource_NeuralNet(unittest.TestCase):
     def tearDownClass(cls):
         cls.sds.close()
 
-    def test_01(self):
-        ## Verify that it parses it...
-        s = self.sds.source(self.src_path,"test")
-        
-    def test_test_method(self):
-        ## Verify that we can call a function.
-        m = self.sds.full((1,2), 1)
-        self.sds.source(self.src_path,"test").test_function(m).to_string().compute()
+    def test_creation(self):
+        """
+        Tests the creation of a List object via the SystemDSContext
+        """
+        m1 = np.array([1., 2., 3.])
+        m1p = self.sds.from_numpy(m1)
+        m2 = np.array([4., 5., 6.])
+        m2p = self.sds.from_numpy(m2)
+        list_obj = self.sds.list(m1p, m2p)
+        tmp = list_obj[0] + list_obj[1]
+        res = tmp.compute().flatten()
+        self.assertTrue(np.allclose(m1 + m2, res))
+
+    def test_addition(self):
+        """
+        Tests the creation of a List object via the SystemDSContext and adds a value
+        """
+        m1 = np.array([1., 2., 3.])
+        m1p = self.sds.from_numpy(m1)
+        m2 = np.array([4., 5., 6.])
+        m2p = self.sds.from_numpy(m2)
+        list_obj = self.sds.list(m1p, m2p)
+        tmp = list_obj[0] + 2
+        res = tmp.compute().flatten()
+        self.assertTrue(np.allclose(m1 + 2, res))
 
 if __name__ == "__main__":
     unittest.main(exit=False)
diff --git a/src/main/python/tests/source/test_source_neural_net.py b/src/main/python/tests/list/test_list_unknown.py
similarity index 60%
copy from src/main/python/tests/source/test_source_neural_net.py
copy to src/main/python/tests/list/test_list_unknown.py
index 07f2e02..5ee7304 100644
--- a/src/main/python/tests/source/test_source_neural_net.py
+++ b/src/main/python/tests/list/test_list_unknown.py
@@ -23,11 +23,15 @@ import unittest
 
 import numpy as np
 from systemds.context import SystemDSContext
+from systemds.operator import List
+from systemds.operator.algorithm import pca
+from systemds.script_building.dag import OutputType
 
-class TestSource_NeuralNet(unittest.TestCase):
+
+class TestListOperationsUnknown(unittest.TestCase):
 
     sds: SystemDSContext = None
-    src_path: str = "./tests/source/neural_net_source.dml"
+    src_path: str = "./tests/list/return_list.dml"
 
     @classmethod
     def setUpClass(cls):
@@ -37,14 +41,21 @@ class TestSource_NeuralNet(unittest.TestCase):
     def tearDownClass(cls):
         cls.sds.close()
 
-    def test_01(self):
-        ## Verify that it parses it...
-        s = self.sds.source(self.src_path,"test")
-        
-    def test_test_method(self):
-        ## Verify that we can call a function.
-        m = self.sds.full((1,2), 1)
-        self.sds.source(self.src_path,"test").test_function(m).to_string().compute()
+    def test_access_other_index_1(self):
+        s = self.sds.source(self.src_path, "func")
+        res = s.f()[1].as_matrix().compute()[0]
+        self.assertEqual(1, res)
+
+    def test_access_other_index_2(self):
+        s = self.sds.source(self.src_path, "func")
+        res = s.f()[2].as_matrix().compute()
+        self.assertTrue(np.allclose(np.full((2, 2), 2), res))
+
+    def test_access_other_index_3(self):
+        s = self.sds.source(self.src_path, "func")
+        res = s.f()[3].as_matrix().compute()
+        self.assertTrue(np.allclose(np.full((3, 3), 3), res))
+
 
 if __name__ == "__main__":
     unittest.main(exit=False)
diff --git a/src/main/python/tests/list/test_operations.py b/src/main/python/tests/list/test_operations.py
deleted file mode 100644
index 818042f..0000000
--- a/src/main/python/tests/list/test_operations.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# -------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# -------------------------------------------------------------
-
-import unittest
-
-import numpy as np
-from systemds.context import SystemDSContext
-from systemds.operator.algorithm import pca
-
-from systemds.operator import List
-from systemds.script_building.dag import OutputType
-
-
-class TestListOperations(unittest.TestCase):
-
-    sds: SystemDSContext = None
-
-    @classmethod
-    def setUpClass(cls):
-        cls.sds = SystemDSContext()
-
-    @classmethod
-    def tearDownClass(cls):
-        cls.sds.close()
-
-    def test_creation(self):
-        """
-        Tests the creation of a List object via the SystemDSContext
-        """
-        m1 = self.sds.from_numpy(np.array([1, 2, 3]))
-        m2 = self.sds.from_numpy(np.array([4, 5, 6]))
-        list_obj = self.sds.list(m1, m2)
-        tmp = list_obj[0] + list_obj[1]
-        res = tmp.compute()
-        self.assertTrue(np.allclose(m2, res))
-
-    def test_addition(self):
-        """
-        Tests the creation of a List object via the SystemDSContext and adds a value
-        """
-        m1 = self.sds.from_numpy(np.array([1, 2, 3]))
-        m2 = self.sds.from_numpy(np.array([4, 5, 6]))
-        list_obj = self.sds.list(m1, m2)
-        tmp = list_obj[0] + 2
-        res = tmp.compute()
-        self.assertTrue(np.allclose(m2 + 2, res))
-
-    def test_500x2b(self):
-        """
-        The purpose of this test is to show that an operation can be performed on the output of a multi output list node,
-        without the need of calculating the result first.
-        """
-        m1 = self.generate_matrices_for_pca(30, seed=1304)
-        node0 = self.sds.from_numpy(m1)
-        # print(features)
-        node1 = List(node0.sds_context, 'pca', named_input_nodes={"X": node0, "K": 1, "scale": "FALSE", "center": "FALSE"},
-                     outputs=[("res", OutputType.MATRIX), ("model", OutputType.MATRIX), ("scale", OutputType.MATRIX), ("center", OutputType.MATRIX)])
-        node2 = node1["res"].abs()
-        res = node2.compute(verbose=False)
-
-    def test_multiple_outputs(self):
-        """
-        The purpose of this test is to show that we can use multiple outputs
-        of a single list node in the DAG in one script
-        """
-        node0 = self.sds.from_numpy(np.array([1, 2, 3, 4, 5, 6, 7, 8, 9]))
-        node1 = self.sds.from_numpy(np.array([10, 20, 30, 40, 50, 60, 70, 80, 90]))
-        params_dict = {'X': node0, 'Y': node1}
-        node2 = List(self.sds, 'split', named_input_nodes=params_dict,
-                     outputs=[("X_train", OutputType.MATRIX), ("X_test", OutputType.MATRIX), ("Y_train", OutputType.MATRIX), ("Y_test", OutputType.MATRIX)])
-        node3 = node2["X_train"] + node2["Y_train"]
-        # X_train and Y_train are of the same shape because node0 and node1 have both only one dimension.
-        # Therefore they can be added together
-        res = node3.compute(verbose=False)
-
-    def generate_matrices_for_pca(self, dims: int, seed: int = 1234):
-        np.random.seed(seed)
-
-        mu, sigma = 0, 0.1
-        s = np.random.normal(mu, sigma,  dims)
-
-        m1 = np.array(np.c_[np.copy(s) * 1, np.copy(s)*0.3], dtype=np.double)
-
-        return m1
-
-
-if __name__ == "__main__":
-    unittest.main(exit=False)
diff --git a/src/main/python/tests/source/test_source_neural_net.py b/src/main/python/tests/source/test_source_neural_net.py
index 07f2e02..5eff8c5 100644
--- a/src/main/python/tests/source/test_source_neural_net.py
+++ b/src/main/python/tests/source/test_source_neural_net.py
@@ -24,6 +24,7 @@ import unittest
 import numpy as np
 from systemds.context import SystemDSContext
 
+
 class TestSource_NeuralNet(unittest.TestCase):
 
     sds: SystemDSContext = None
@@ -38,13 +39,17 @@ class TestSource_NeuralNet(unittest.TestCase):
         cls.sds.close()
 
     def test_01(self):
-        ## Verify that it parses it...
-        s = self.sds.source(self.src_path,"test")
-        
+        # Verify that it parses it...
+        s = self.sds.source(self.src_path, "test")
+
     def test_test_method(self):
-        ## Verify that we can call a function.
-        m = self.sds.full((1,2), 1)
-        self.sds.source(self.src_path,"test").test_function(m).to_string().compute()
+        # Verify that we can call a function.
+        m = np.full((1, 2), 1)
+        res = self.sds.source(self.src_path, "test")\
+            .test_function(self.sds.full((1, 2), 1))[1]\
+            .as_matrix().compute()
+        self.assertTrue(np.allclose(m, res))
+
 
 if __name__ == "__main__":
     unittest.main(exit=False)

[systemds] 01/04: [SYSTEMDS-2828] Python Multi Return Continuation

Posted by ba...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git

commit bfc58f15aec8d65ab01e8488678c6eb9838f19d1
Author: TMaddox <gi...@mailexpress.cc>
AuthorDate: Fri May 7 22:14:03 2021 +0200

    [SYSTEMDS-2828] Python Multi Return Continuation
    
    This commit adds support for python multi return continuation.
    It give the ability to continue processing variables that are returned
    from a function call that return more than one variable.
---
 .../python/systemds/context/systemds_context.py    |  16 +++-
 src/main/python/systemds/operator/__init__.py      |   3 +-
 src/main/python/systemds/operator/nodes/list.py    |  88 +++++++++++++++++
 .../python/systemds/operator/operation_node.py     |  33 +------
 src/main/python/systemds/script_building/dag.py    |  41 ++++++--
 src/main/python/systemds/script_building/script.py |  36 ++++---
 src/main/python/tests/algorithms/test_pca.py       |   5 +-
 src/main/python/tests/list/test_operations.py      | 106 +++++++++++++++++++++
 8 files changed, 275 insertions(+), 53 deletions(-)

diff --git a/src/main/python/systemds/context/systemds_context.py b/src/main/python/systemds/context/systemds_context.py
index f7f8199..80db697 100644
--- a/src/main/python/systemds/context/systemds_context.py
+++ b/src/main/python/systemds/context/systemds_context.py
@@ -38,7 +38,7 @@ import numpy as np
 import pandas as pd
 from py4j.java_gateway import GatewayParameters, JavaGateway
 from py4j.protocol import Py4JNetworkError
-from systemds.operator import Frame, Matrix, OperationNode, Scalar, Source
+from systemds.operator import Frame, Matrix, OperationNode, Scalar, Source, List
 from systemds.script_building import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 from systemds.utils.helpers import get_module_dir
@@ -458,3 +458,17 @@ class SystemDSContext(object):
         :param print_imported_methods: boolean specifying if the imported methods should be printed.
         """
         return Source(self, path, name, print_imported_methods)
+
+    def list(self, *args: Sequence[VALID_INPUT_TYPES], **kwargs: Dict[str, VALID_INPUT_TYPES]) -> 'List':
+        if len(kwargs) != 0 and len(args) != 0:
+            raise Exception("Accepts either args or kwargs")
+        elif len(kwargs) != 0:
+            out = []
+            for key, arg in kwargs.items():
+                out.append((key, OutputType.from_type(arg)))
+            return List(self, 'list', named_input_nodes=kwargs, outputs=out)
+        elif len(args) != 0:
+            out = []
+            for idx, arg in enumerate(args):
+                out.append((f"_{idx}", OutputType.from_type(arg)))
+            return List(self, 'list', unnamed_input_nodes=args, outputs=out)
diff --git a/src/main/python/systemds/operator/__init__.py b/src/main/python/systemds/operator/__init__.py
index fcecc9e..cda9ba2 100644
--- a/src/main/python/systemds/operator/__init__.py
+++ b/src/main/python/systemds/operator/__init__.py
@@ -24,6 +24,7 @@ from systemds.operator.nodes.scalar import Scalar
 from systemds.operator.nodes.matrix import Matrix
 from systemds.operator.nodes.frame import Frame
 from systemds.operator.nodes.source import Source
+from systemds.operator.nodes.list import List
 from systemds.operator import algorithm
 
-__all__ = [OperationNode, algorithm, Scalar, Matrix, Frame, Source]
+__all__ = [OperationNode, algorithm, Scalar, List, Matrix, Frame, Source]
diff --git a/src/main/python/systemds/operator/nodes/list.py b/src/main/python/systemds/operator/nodes/list.py
new file mode 100644
index 0000000..64e37eb
--- /dev/null
+++ b/src/main/python/systemds/operator/nodes/list.py
@@ -0,0 +1,88 @@
+# -------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# -------------------------------------------------------------
+
+__all__ = ["List"]
+
+from typing import Dict, Sequence, Tuple, Union, Iterable, List
+
+import numpy as np
+from py4j.java_gateway import JavaObject
+
+from systemds.operator import OperationNode, Matrix
+from systemds.script_building.dag import OutputType
+from systemds.utils.consts import VALID_INPUT_TYPES
+from systemds.utils.converters import numpy_to_matrix_block
+from systemds.utils.helpers import create_params_string
+
+
+class List(OperationNode):
+
+    def __init__(self, sds_context: 'SystemDSContext', operation: str,
+                 unnamed_input_nodes: Union[str, Iterable[VALID_INPUT_TYPES]] = None,
+                 named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None,
+                 outputs: List[Tuple[str, OutputType]] = [("_1", OutputType.MATRIX)]):
+
+        is_python_local_data = False
+        self._outputs = outputs
+        self._named_output_nodes = {}
+        for idx, output in enumerate(outputs):
+            if output[1] == OutputType.MATRIX:
+                self.named_output_nodes[output[0]] = Matrix(sds_context, operation='list', named_input_nodes={f"_{idx}": self})
+                # TODO add output types
+
+        super().__init__(sds_context, operation, unnamed_input_nodes,
+                         named_input_nodes, OutputType.LIST, is_python_local_data)
+
+    def __getitem__(self, key):
+        if isinstance(key, int):
+            return self.named_output_nodes[self._outputs[key][0]]
+        return self.named_output_nodes[key]
+
+    def pass_python_data_to_prepared_script(self, sds, var_name: str, prepared_script: JavaObject) -> None:
+        assert self.is_python_local_data, 'Can only pass data to prepared script if it is python local!'
+        if self._is_numpy():
+            prepared_script.setMatrix(var_name, numpy_to_matrix_block(
+                sds, self._np_array), True)  # True for reuse
+
+    def __parse_output_result_list(self, result_variables):
+        result_var = []
+        named_output_nodes_types_list = [type(named_output_node).__name__ for named_output_node in list(self.named_output_nodes.values())]
+        for idx, v in enumerate(self._script.out_var_name):
+            if named_output_nodes_types_list[idx] == "Matrix":
+                result_var.append(self.__parse_output_result_matrix(result_variables, v))
+            elif named_output_nodes_types_list[idx] == "Frame":
+                result_var.append(self.__parse_output_result_frame(result_variables, v))
+            else:
+                result_var.append(result_variables.getDouble(self._script.out_var_name[idx]))
+        return result_var
+
+    def code_line(self, var_name: str, unnamed_input_vars: Sequence[str],
+                  named_input_vars: Dict[str, str]) -> str:
+
+        inputs_comma_sep = create_params_string(unnamed_input_vars, named_input_vars)
+        output = "["
+        for idx, output_node in enumerate(self.named_output_nodes):
+            output += f'{var_name}_{idx},'
+        output = output[:-1] + "]"
+        return f'{output}={self.operation}({inputs_comma_sep});'
+
+    def compute(self, verbose: bool = False, lineage: bool = False) -> Union[np.array]:
+        return super().compute(verbose, lineage)
diff --git a/src/main/python/systemds/operator/operation_node.py b/src/main/python/systemds/operator/operation_node.py
index 3f98598..6dcd56c 100644
--- a/src/main/python/systemds/operator/operation_node.py
+++ b/src/main/python/systemds/operator/operation_node.py
@@ -50,9 +50,7 @@ class OperationNode(DAGNode):
                                             Iterable[VALID_INPUT_TYPES]] = None,
                  named_input_nodes: Dict[str, VALID_INPUT_TYPES] = None,
                  output_type: OutputType = OutputType.MATRIX,
-                 is_python_local_data: bool = False,
-                 number_of_outputs=1,
-                 output_types: Iterable[OutputType] = None):
+                 is_python_local_data: bool = False):
                  
         """
         Create general `OperationNode`
@@ -81,10 +79,9 @@ class OperationNode(DAGNode):
         self._result_var = None
         self._lineage_trace = None
         self._script = None
-        self._number_of_outputs = number_of_outputs
-        self._output_types = output_types
         self._source_node = None
         self._already_added = False
+        self.dml_name = ""
 
     def compute(self, verbose: bool = False, lineage: bool = False) -> \
             Union[float, np.array, Tuple[Union[float, np.array], str]]:
@@ -138,21 +135,6 @@ class OperationNode(DAGNode):
             self.sds_context, result_variables.getFrameBlock(var_name)
         )
 
-    def __parse_output_result_list(self, result_variables):
-        result_var = []
-        for idx, v in enumerate(self._script.out_var_name):
-            if(self._output_types == None or self._output_types[idx] == OutputType.MATRIX):
-                result_var.append(
-                    self.__parse_output_result_matrix(result_variables, v))
-            elif self._output_types[idx] == OutputType.FRAME:
-                result_var.append(
-                    self.__parse_output_result_frame(result_variables, v))
-
-            else:
-                result_var.append(result_variables.getDouble(
-                    self._script.out_var_name[idx]))
-        return result_var
-
     def get_lineage_trace(self) -> str:
         """Get the lineage trace for this node.
 
@@ -174,16 +156,9 @@ class OperationNode(DAGNode):
                 unnamed_input_vars) == 2, 'Binary Operations need exactly two input variables'
             return f'{var_name}={unnamed_input_vars[0]}{self.operation}{unnamed_input_vars[1]}'
 
-        inputs_comma_sep = create_params_string(
-            unnamed_input_vars, named_input_vars)
+        inputs_comma_sep = create_params_string(unnamed_input_vars, named_input_vars)
 
-        if self.output_type == OutputType.LIST:
-            output = "["
-            for idx in range(self._number_of_outputs):
-                output += f'{var_name}_{idx},'
-            output = output[:-1] + "]"
-            return f'{output}={self.operation}({inputs_comma_sep});'
-        elif self.output_type == OutputType.NONE:
+        if self.output_type == OutputType.NONE:
             return f'{self.operation}({inputs_comma_sep});'
         # elif self.output_type == OutputType.ASSIGN:
         #     return f'{var_name}={self.operation};'
diff --git a/src/main/python/systemds/script_building/dag.py b/src/main/python/systemds/script_building/dag.py
index 3abdc74..2ca2e8f 100644
--- a/src/main/python/systemds/script_building/dag.py
+++ b/src/main/python/systemds/script_building/dag.py
@@ -24,6 +24,8 @@ from enum import Enum, auto
 from typing import TYPE_CHECKING, Any, Dict, Sequence, Union, Optional
 
 from py4j.java_gateway import JavaObject, JVMView
+
+import systemds.operator
 from systemds.utils.consts import VALID_INPUT_TYPES
 
 if TYPE_CHECKING:
@@ -68,18 +70,37 @@ class OutputType(Enum):
 
         return OutputType.NONE
 
+    @staticmethod
+    def from_type(obj):
+        if obj is not None:
+            if isinstance(obj, systemds.operator.Matrix):
+                return OutputType.MATRIX
+            elif isinstance(obj, systemds.operator.Frame):
+                return OutputType.FRAME
+            elif isinstance(obj, systemds.operator.Scalar):
+                return OutputType.SCALAR
+            elif isinstance(obj, float):  # TODO is this correct?
+                return OutputType.DOUBLE
+            elif isinstance(obj, str):
+                return OutputType.STRING
+            elif isinstance(obj, systemds.operator.List):
+                return OutputType.LIST
+
+        return OutputType.NONE
+
 
 class DAGNode(ABC):
     """A Node in the directed-acyclic-graph (DAG) defining all operations."""
     sds_context: 'SystemDSContext'
     _unnamed_input_nodes: Sequence[Union['DAGNode', str, int, float, bool]]
     _named_input_nodes: Dict[str, Union['DAGNode', str, int, float, bool]]
+    _named_output_nodes: Dict[str, Union['DAGNode', str, int, float, bool]]
     _source_node: Optional["DAGNode"]
     _output_type: OutputType
     _script: Optional["DMLScript"]
     _is_python_local_data: bool
-    _number_of_outputs: int
     _already_added: bool
+    _dml_name: str
 
     def compute(self, verbose: bool = False, lineage: bool = False) -> Any:
         """Get result of this operation. Builds the dml script and executes it in SystemDS, before this method is called
@@ -126,12 +147,12 @@ class DAGNode(ABC):
         return self._named_input_nodes
 
     @property
-    def is_python_local_data(self):
-        return self._is_python_local_data
+    def named_output_nodes(self):
+        return self._named_output_nodes
 
     @property
-    def number_of_outputs(self):
-        return self._number_of_outputs
+    def is_python_local_data(self):
+        return self._is_python_local_data
 
     @property
     def output_type(self):
@@ -147,4 +168,12 @@ class DAGNode(ABC):
 
     @property
     def script_str(self):
-        return self._script.dml_script
\ No newline at end of file
+        return self._script.dml_script
+
+    @property
+    def dml_name(self):
+        return self._dml_name
+
+    @dml_name.setter
+    def dml_name(self, value):
+        self._dml_name = value
diff --git a/src/main/python/systemds/script_building/script.py b/src/main/python/systemds/script_building/script.py
index eb145b0..3eed51c 100644
--- a/src/main/python/systemds/script_building/script.py
+++ b/src/main/python/systemds/script_building/script.py
@@ -158,10 +158,10 @@ class DMLScript:
         :param dag_root: the topmost operation of our DAG, result of operation will be output
         """
         baseOutVarString = self._dfs_dag_nodes(dag_root)
-        if(dag_root.output_type != OutputType.NONE):
-            if(dag_root.number_of_outputs > 1):
+        if dag_root.output_type != OutputType.NONE:
+            if dag_root.output_type == OutputType.LIST:
                 self.out_var_name = []
-                for idx in range(dag_root.number_of_outputs):
+                for idx, output_node in enumerate(dag_root.named_output_nodes):
                     self.add_code(
                         f'write({baseOutVarString}_{idx}, \'./tmp_{idx}\');')
                     self.out_var_name.append(f'{baseOutVarString}_{idx}')
@@ -179,31 +179,37 @@ class DMLScript:
             if isinstance(dag_node, bool):
                 return 'TRUE' if dag_node else 'FALSE'
             return str(dag_node)
+
+        if dag_node.dml_name != "":
+            return dag_node.dml_name
+
         if dag_node._output_type == OutputType.IMPORT:
             if not dag_node.already_added:
                 self.add_code(dag_node.code_line(None, None))
             return None
+
         if dag_node._source_node is not None:
             self._dfs_dag_nodes(dag_node._source_node)
         # for each node do the dfs operation and save the variable names in `input_var_names`
         # get variable names of unnamed parameters
 
-        unnamed_input_vars = [self._dfs_dag_nodes(
-            input_node) for input_node in dag_node.unnamed_input_nodes]
-        
-        # get variable names of named parameters
-        named_input_vars = {name: self._dfs_dag_nodes(input_node) for name, input_node in
-                            dag_node.named_input_nodes.items()}
+        unnamed_input_vars = [self._dfs_dag_nodes(input_node) for input_node in dag_node.unnamed_input_nodes]
 
-        curr_var_name = self._next_unique_var()
+        named_input_vars = {}
+        for name, input_node in dag_node.named_input_nodes.items():
+            named_input_vars[name] = self._dfs_dag_nodes(input_node)
+            if isinstance(input_node, DAGNode) and input_node._output_type == OutputType.LIST:
+                dag_node.dml_name = named_input_vars[name] + name
+                return dag_node.dml_name
+
+        dag_node.dml_name = self._next_unique_var()
 
         if dag_node.is_python_local_data:
-            self.add_input_from_python(curr_var_name, dag_node)
-        
-        code_line = dag_node.code_line(
-            curr_var_name, unnamed_input_vars, named_input_vars)
+            self.add_input_from_python(dag_node.dml_name, dag_node)
+
+        code_line = dag_node.code_line(dag_node.dml_name, unnamed_input_vars, named_input_vars)
         self.add_code(code_line)
-        return curr_var_name
+        return dag_node.dml_name
 
     def _next_unique_var(self) -> str:
         """Gets the next unique variable name
diff --git a/src/main/python/tests/algorithms/test_pca.py b/src/main/python/tests/algorithms/test_pca.py
index bf5bb8c..0f774c0 100644
--- a/src/main/python/tests/algorithms/test_pca.py
+++ b/src/main/python/tests/algorithms/test_pca.py
@@ -25,6 +25,9 @@ import numpy as np
 from systemds.context import SystemDSContext
 from systemds.operator.algorithm import pca
 
+from systemds.operator import List
+from systemds.script_building.dag import OutputType
+
 
 class TestPCA(unittest.TestCase):
 
@@ -48,7 +51,7 @@ class TestPCA(unittest.TestCase):
         m1 = self.generate_matrices_for_pca(30, seed=1304)
         X = self.sds.from_numpy( m1)
         # print(features)
-        [res, model, _, _ ] = pca(X, K=1, scale="FALSE", center="FALSE").compute()
+        [res, model, _, _] = pca(X, K=1, scale="FALSE", center="FALSE").compute()
         for (x, y) in zip(m1, res):
             self.assertTrue((x[0] > 0 and y > 0) or (x[0] < 0 and y < 0))
 
diff --git a/src/main/python/tests/list/test_operations.py b/src/main/python/tests/list/test_operations.py
new file mode 100644
index 0000000..818042f
--- /dev/null
+++ b/src/main/python/tests/list/test_operations.py
@@ -0,0 +1,106 @@
+# -------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# -------------------------------------------------------------
+
+import unittest
+
+import numpy as np
+from systemds.context import SystemDSContext
+from systemds.operator.algorithm import pca
+
+from systemds.operator import List
+from systemds.script_building.dag import OutputType
+
+
+class TestListOperations(unittest.TestCase):
+
+    sds: SystemDSContext = None
+
+    @classmethod
+    def setUpClass(cls):
+        cls.sds = SystemDSContext()
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.sds.close()
+
+    def test_creation(self):
+        """
+        Tests the creation of a List object via the SystemDSContext
+        """
+        m1 = self.sds.from_numpy(np.array([1, 2, 3]))
+        m2 = self.sds.from_numpy(np.array([4, 5, 6]))
+        list_obj = self.sds.list(m1, m2)
+        tmp = list_obj[0] + list_obj[1]
+        res = tmp.compute()
+        self.assertTrue(np.allclose(m2, res))
+
+    def test_addition(self):
+        """
+        Tests the creation of a List object via the SystemDSContext and adds a value
+        """
+        m1 = self.sds.from_numpy(np.array([1, 2, 3]))
+        m2 = self.sds.from_numpy(np.array([4, 5, 6]))
+        list_obj = self.sds.list(m1, m2)
+        tmp = list_obj[0] + 2
+        res = tmp.compute()
+        self.assertTrue(np.allclose(m2 + 2, res))
+
+    def test_500x2b(self):
+        """
+        The purpose of this test is to show that an operation can be performed on the output of a multi output list node,
+        without the need of calculating the result first.
+        """
+        m1 = self.generate_matrices_for_pca(30, seed=1304)
+        node0 = self.sds.from_numpy(m1)
+        # print(features)
+        node1 = List(node0.sds_context, 'pca', named_input_nodes={"X": node0, "K": 1, "scale": "FALSE", "center": "FALSE"},
+                     outputs=[("res", OutputType.MATRIX), ("model", OutputType.MATRIX), ("scale", OutputType.MATRIX), ("center", OutputType.MATRIX)])
+        node2 = node1["res"].abs()
+        res = node2.compute(verbose=False)
+
+    def test_multiple_outputs(self):
+        """
+        The purpose of this test is to show that we can use multiple outputs
+        of a single list node in the DAG in one script
+        """
+        node0 = self.sds.from_numpy(np.array([1, 2, 3, 4, 5, 6, 7, 8, 9]))
+        node1 = self.sds.from_numpy(np.array([10, 20, 30, 40, 50, 60, 70, 80, 90]))
+        params_dict = {'X': node0, 'Y': node1}
+        node2 = List(self.sds, 'split', named_input_nodes=params_dict,
+                     outputs=[("X_train", OutputType.MATRIX), ("X_test", OutputType.MATRIX), ("Y_train", OutputType.MATRIX), ("Y_test", OutputType.MATRIX)])
+        node3 = node2["X_train"] + node2["Y_train"]
+        # X_train and Y_train are of the same shape because node0 and node1 have both only one dimension.
+        # Therefore they can be added together
+        res = node3.compute(verbose=False)
+
+    def generate_matrices_for_pca(self, dims: int, seed: int = 1234):
+        np.random.seed(seed)
+
+        mu, sigma = 0, 0.1
+        s = np.random.normal(mu, sigma,  dims)
+
+        m1 = np.array(np.c_[np.copy(s) * 1, np.copy(s)*0.3], dtype=np.double)
+
+        return m1
+
+
+if __name__ == "__main__":
+    unittest.main(exit=False)

[systemds] 04/04: [SYSTEMDS-3006] Python AutoGenerator methods with types

Posted by ba...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git

commit 97523dd0b6139300d6f016aa293315ff5cc7f1e2
Author: baunsgaard <ba...@tugraz.at>
AuthorDate: Thu Jun 3 13:25:31 2021 +0200

    [SYSTEMDS-3006] Python AutoGenerator methods with types
    
    Specify the types for the inputs in the functions definitions, such
    that it is clear if the input is matrix, scalar, or frame.
    
    Closes #1293
---
 src/main/python/generator/generator.py             | 71 +++++++++-------------
 .../resources/template_python_script_imports       |  1 +
 .../python/generator/resources/type_mapping.json   |  4 +-
 .../python/systemds/operator/algorithm/__init__.py |  3 +-
 .../systemds/operator/algorithm/builtin/abstain.py | 15 ++---
 .../systemds/operator/algorithm/builtin/als.py     |  9 ++-
 .../systemds/operator/algorithm/builtin/alsCG.py   |  9 ++-
 .../systemds/operator/algorithm/builtin/alsDS.py   |  9 ++-
 .../operator/algorithm/builtin/alsPredict.py       | 15 ++---
 .../operator/algorithm/builtin/alsTopkPredict.py   | 12 ++--
 .../systemds/operator/algorithm/builtin/arima.py   | 13 ++--
 .../systemds/operator/algorithm/builtin/bandit.py  | 15 +++--
 .../systemds/operator/algorithm/builtin/bivar.py   | 13 ++--
 .../operator/algorithm/builtin/components.py       | 13 ++--
 .../operator/algorithm/builtin/confusionMatrix.py  |  9 ++-
 .../systemds/operator/algorithm/builtin/cor.py     | 12 ++--
 .../systemds/operator/algorithm/builtin/cox.py     | 12 ++--
 .../systemds/operator/algorithm/builtin/cspline.py | 11 ++--
 .../operator/algorithm/builtin/csplineDS.py        | 10 +--
 .../systemds/operator/algorithm/builtin/cvlm.py    | 11 ++--
 .../systemds/operator/algorithm/builtin/dbscan.py  | 13 ++--
 .../operator/algorithm/builtin/decisionTree.py     | 16 ++---
 .../operator/algorithm/builtin/discoverFD.py       | 14 ++---
 .../systemds/operator/algorithm/builtin/dist.py    | 12 ++--
 .../operator/algorithm/builtin/executePipeline.py  | 13 ++--
 .../algorithm/builtin/gaussianClassifier.py        | 13 ++--
 .../operator/algorithm/builtin/getAccuracy.py      | 14 ++---
 .../systemds/operator/algorithm/builtin/glm.py     | 14 ++---
 .../systemds/operator/algorithm/builtin/gmm.py     | 10 +--
 .../operator/algorithm/builtin/gmmPredict.py       | 12 ++--
 .../systemds/operator/algorithm/builtin/gnmf.py    | 10 +--
 .../operator/algorithm/builtin/hyperband.py        | 14 +++--
 .../operator/algorithm/builtin/img_brightness.py   | 14 ++---
 .../operator/algorithm/builtin/img_crop.py         | 16 ++---
 .../operator/algorithm/builtin/img_cutout.py       | 17 +++---
 .../operator/algorithm/builtin/img_invert.py       | 13 ++--
 .../operator/algorithm/builtin/img_mirror.py       | 13 ++--
 .../operator/algorithm/builtin/img_posterize.py    | 13 ++--
 .../operator/algorithm/builtin/img_rotate.py       | 14 ++---
 .../algorithm/builtin/img_sample_pairing.py        | 14 ++---
 .../operator/algorithm/builtin/img_shear.py        | 15 ++---
 .../operator/algorithm/builtin/img_transform.py    | 21 ++++---
 .../operator/algorithm/builtin/img_translate.py    | 17 +++---
 .../operator/algorithm/builtin/imputeByFD.py       | 16 ++---
 .../operator/algorithm/builtin/imputeByMean.py     | 13 ++--
 .../operator/algorithm/builtin/imputeByMedian.py   | 13 ++--
 .../operator/algorithm/builtin/imputeByMode.py     | 12 ++--
 .../operator/algorithm/builtin/intersect.py        | 13 ++--
 .../systemds/operator/algorithm/builtin/km.py      | 12 ++--
 .../systemds/operator/algorithm/builtin/kmeans.py  |  9 ++-
 .../operator/algorithm/builtin/kmeansPredict.py    | 13 ++--
 .../systemds/operator/algorithm/builtin/knnbf.py   | 14 ++---
 .../systemds/operator/algorithm/builtin/l2svm.py   | 14 ++---
 .../operator/algorithm/builtin/l2svmPredict.py     | 10 +--
 .../systemds/operator/algorithm/builtin/lasso.py   | 14 ++---
 .../systemds/operator/algorithm/builtin/lm.py      | 14 ++---
 .../systemds/operator/algorithm/builtin/lmCG.py    | 14 ++---
 .../systemds/operator/algorithm/builtin/lmDS.py    | 14 ++---
 .../operator/algorithm/builtin/lmPredict.py        | 15 ++---
 .../operator/algorithm/builtin/logSumExp.py        | 13 ++--
 .../systemds/operator/algorithm/builtin/msvm.py    | 14 ++---
 .../operator/algorithm/builtin/msvmPredict.py      |  9 ++-
 .../operator/algorithm/builtin/multiLogReg.py      | 14 ++---
 .../algorithm/builtin/multiLogRegPredict.py        | 11 ++--
 .../systemds/operator/algorithm/builtin/na_locf.py | 13 ++--
 .../operator/algorithm/builtin/naiveBayes.py       | 10 +--
 .../algorithm/builtin/naiveBayesPredict.py         | 10 +--
 .../operator/algorithm/builtin/normalize.py        | 12 ++--
 .../systemds/operator/algorithm/builtin/outlier.py | 13 ++--
 .../operator/algorithm/builtin/outlierByArima.py   | 13 ++--
 .../operator/algorithm/builtin/outlierByIQR.py     | 15 ++---
 .../operator/algorithm/builtin/outlierBySd.py      | 14 ++---
 .../systemds/operator/algorithm/builtin/pca.py     |  9 ++-
 .../systemds/operator/algorithm/builtin/pnmf.py    | 10 +--
 .../systemds/operator/algorithm/builtin/ppca.py    |  9 ++-
 .../operator/algorithm/builtin/randomForest.py     | 11 ++--
 .../systemds/operator/algorithm/builtin/scale.py   | 10 +--
 .../operator/algorithm/builtin/scaleApply.py       | 14 ++---
 .../operator/algorithm/builtin/sherlock.py         |  9 ++-
 .../operator/algorithm/builtin/sherlockPredict.py  | 42 ++++++++++---
 .../systemds/operator/algorithm/builtin/sigmoid.py | 12 ++--
 .../operator/algorithm/builtin/slicefinder.py      | 10 +--
 .../systemds/operator/algorithm/builtin/smote.py   | 14 ++---
 .../systemds/operator/algorithm/builtin/split.py   | 10 +--
 .../operator/algorithm/builtin/splitBalanced.py    | 11 ++--
 .../operator/algorithm/builtin/stableMarriage.py   | 14 ++---
 .../systemds/operator/algorithm/builtin/statsNA.py | 13 ++--
 .../systemds/operator/algorithm/builtin/steplm.py  | 10 +--
 .../operator/algorithm/builtin/toOneHot.py         | 13 ++--
 .../operator/algorithm/builtin/tomeklink.py        |  9 ++-
 .../systemds/operator/algorithm/builtin/univar.py  | 13 ++--
 .../operator/algorithm/builtin/vectorToCsv.py      | 12 ++--
 .../operator/algorithm/builtin/winsorize.py        | 13 ++--
 .../systemds/operator/algorithm/builtin/xdummy1.py | 12 ++--
 .../systemds/operator/algorithm/builtin/xdummy2.py |  8 +--
 95 files changed, 635 insertions(+), 613 deletions(-)

diff --git a/src/main/python/generator/generator.py b/src/main/python/generator/generator.py
index 7ee39e3..39dc59e 100644
--- a/src/main/python/generator/generator.py
+++ b/src/main/python/generator/generator.py
@@ -97,8 +97,7 @@ class PythonAPIFunctionGenerator(object):
     api_template = u"""def {function_name}({parameters}):
     {header}
     {params_dict}
-    {api_call}\n\n
-    """
+    {api_call}\n"""
 
     kwargs_parameter_string = u"**kwargs: Dict[str, VALID_INPUT_TYPES]"
     kwargs_result = u"params_dict.update(kwargs)"
@@ -128,8 +127,9 @@ class PythonAPIFunctionGenerator(object):
             }
         @return: function definition
         """
-        parameters = self.format_param_string(data['parameters'])
         function_name = data['function_name']
+        parameters = self.format_param_string(
+            data['parameters'], len(function_name))
         header = data['function_header'] if data['function_header'] else ""
         params_dict = self.format_params_dict_string(data['parameters'])
         api_call = self.format_api_call(
@@ -138,39 +138,32 @@ class PythonAPIFunctionGenerator(object):
             data['function_name']
         )
         return self.__class__.api_template.format(
-            function_name=function_name,
-            parameters=parameters,
-            header=header,
-            params_dict=params_dict,
-            api_call=api_call
-        )
+            function_name=function_name, parameters=parameters, header=header,
+            params_dict=params_dict, api_call=api_call)
 
-    def format_param_string(self, parameters: List[Tuple[str]]) -> str:
-        result = u""
+    def format_param_string(self, parameters: List[Tuple[str]], nameLength: int) -> str:
+        result = []
         has_optional = False
         path = os.path.dirname(__file__)
+        newline_spacing = "\n" + " " * (nameLength + 5)
         for param in parameters:
             # map data types
             pattern = self.__class__.type_mapping_pattern
-            param = tuple([self.__class__.type_mapping["type"].get(re.search(pattern, str(
-                item).lower()).group() if item else str(item).lower(), item) for item in param])
+            param = [self.__class__.type_mapping["type"].get(re.search(pattern, str(
+                item).lower()).group() if item else str(item).lower(), item) for item in param]
             if param[2] is not None:
                 has_optional = True
             else:
-                if len(result):
-                    result = u"{result}, ".format(result=result)
-                result = u"{result}{name}: {typ}".format(
-                    result=result,
-                    name=param[0],
-                    typ=param[1]
-                )
+                result.append("{nl}{name}: {typ},".format(
+                    result=result, name=param[0], typ=param[1],
+                    nl=newline_spacing))
+        result[0] = result[0][len(newline_spacing):]
+        result[-1] = result[-1][:-1]
+        result = "".join(result)
         if has_optional:
-            if len(result):
-                result = u"{result}, ".format(result=result)
-            result = u"{result}{kwargs}".format(
-                result=result,
-                kwargs=self.__class__.kwargs_parameter_string
-            )
+            result = u"{result},{nl}{kwargs}".format(
+                result=result, kwargs=self.__class__.kwargs_parameter_string,
+                nl=newline_spacing)
         return result
 
     def format_params_dict_string(self, parameters: List[Tuple[str]]) -> str:
@@ -187,7 +180,7 @@ class PythonAPIFunctionGenerator(object):
                         result=result)
                 else:
                     result = u"params_dict = {"
-                result = u"{result}\'{name}\':{name}".format(
+                result = u"{result}\'{name}\': {name}".format(
                     result=result,
                     name=param[0]
                 )
@@ -204,7 +197,6 @@ class PythonAPIFunctionGenerator(object):
                         return_values: List[Tuple[str]],
                         function_name: str
                         ) -> str:
-        nl = "\n\t\t"
         length = len(return_values)
         param_string = ""
         param = parameters[0]
@@ -229,11 +221,10 @@ class PythonAPIFunctionGenerator(object):
             else:
                 raise AttributeError("Error in pattern match")
             result = ("{sds_context}," +
-                      "{nl}\'{function_name}\'," +
-                      "{nl}named_input_nodes=params_dict").format(
+                      "\n        \'{function_name}\'," +
+                      "\n        named_input_nodes=params_dict").format(
                 sds_context=sds_context,
-                function_name=function_name,
-                nl=nl
+                function_name=function_name
             )
             result = "return Matrix({params})".format(params=result)
             return result
@@ -246,8 +237,9 @@ class PythonAPIFunctionGenerator(object):
             output_type = re.search(pattern, value[1])[0].upper()
             # print(output_type)
             output_type = output_type.lower()
+
             if output_type == "matrix":
-                object_type= "Matrix"
+                object_type = "Matrix"
             elif output_type == "frame":
                 object_type = "Frame"
             elif output_type == "double":
@@ -256,10 +248,13 @@ class PythonAPIFunctionGenerator(object):
                 object_type = "Scalar"
             elif output_type == "integer":
                 object_type = "Scalar"
+            elif output_type == "list":
+                object_type = "List"
             else:
                 raise ValueError("Unknown type " + object_type)
+
             lines.append("    vX_{idx} = {obj}({sds}, '')".format(
-                idx=idx,obj = object_type, sds=sds_context))
+                idx=idx, obj=object_type, sds=sds_context))
             output_nodes += "vX_{idx}, ".format(idx=idx)
             op_assignment.append(
                 "    vX_{idx}._unnamed_input_nodes = [op]".format(idx=idx))
@@ -348,12 +343,4 @@ if __name__ == "__main__":
             continue
         file_generator.generate_file(
             data["function_name"], script_content, dml_file)
-    # [print(x) for x in enumerate(files)]
-    # dml_file = next(x for i, x in enumerate(files) if i == 80)
-    # header_data = f_parser.parse_header(dml_file)
-    # data = f_parser.parse_function(dml_file)
-    # f_parser.check_parameters(header_data, data)
-    # data['function_header'] = doc_generator.generate_documentation(
-    #     header_data)
-    # script_content = fun_generator.generate_function(data)
     file_generator.generate_init_file()
diff --git a/src/main/python/generator/resources/template_python_script_imports b/src/main/python/generator/resources/template_python_script_imports
index fdc16c7..572c6be 100644
--- a/src/main/python/generator/resources/template_python_script_imports
+++ b/src/main/python/generator/resources/template_python_script_imports
@@ -5,3 +5,4 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
+
diff --git a/src/main/python/generator/resources/type_mapping.json b/src/main/python/generator/resources/type_mapping.json
index aeebc95..7d2041a 100644
--- a/src/main/python/generator/resources/type_mapping.json
+++ b/src/main/python/generator/resources/type_mapping.json
@@ -1,8 +1,8 @@
 {
     "__comment__": "insert type_mapping from dml to python here",
     "type": {
-            "matrix": "OperationNode",
-            "frame": "OperationNode",
+            "matrix": "Matrix",
+            "frame": "Frame",
             "boolean": "bool",
             "integer": "int",
             "double": "float",
diff --git a/src/main/python/systemds/operator/algorithm/__init__.py b/src/main/python/systemds/operator/algorithm/__init__.py
index d6f281b..d2e5d83 100644
--- a/src/main/python/systemds/operator/algorithm/__init__.py
+++ b/src/main/python/systemds/operator/algorithm/__init__.py
@@ -42,6 +42,7 @@ from .builtin.decisionTree import decisionTree
 from .builtin.discoverFD import discoverFD 
 from .builtin.dist import dist 
 from .builtin.executePipeline import executePipeline 
+from .builtin.gaussianClassifier import gaussianClassifier 
 from .builtin.getAccuracy import getAccuracy 
 from .builtin.glm import glm 
 from .builtin.gmm import gmm 
@@ -112,4 +113,4 @@ from .builtin.winsorize import winsorize
 from .builtin.xdummy1 import xdummy1 
 from .builtin.xdummy2 import xdummy2 
 
-__all__ = [abstain, als, alsCG, alsDS, alsPredict, alsTopkPredict, arima, bandit, bivar, components, confusionMatrix, cor, cox, cspline, csplineDS, cvlm, dbscan, decisionTree, discoverFD, dist, executePipeline, getAccuracy, glm, gmm, gmmPredict, gnmf, hyperband, img_brightness, img_crop, img_cutout, img_invert, img_mirror, img_posterize, img_rotate, img_sample_pairing, img_shear, img_transform, img_translate, imputeByFD, imputeByMean, imputeByMedian, imputeByMode, intersect, km, kmeans,  [...]
+__all__ = [abstain, als, alsCG, alsDS, alsPredict, alsTopkPredict, arima, bandit, bivar, components, confusionMatrix, cor, cox, cspline, csplineDS, cvlm, dbscan, decisionTree, discoverFD, dist, executePipeline, gaussianClassifier, getAccuracy, glm, gmm, gmmPredict, gnmf, hyperband, img_brightness, img_crop, img_cutout, img_invert, img_mirror, img_posterize, img_rotate, img_sample_pairing, img_shear, img_transform, img_translate, imputeByFD, imputeByMean, imputeByMedian, imputeByMode, int [...]
diff --git a/src/main/python/systemds/operator/algorithm/builtin/abstain.py b/src/main/python/systemds/operator/algorithm/builtin/abstain.py
index 26e8b27..4d0a0fb 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/abstain.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/abstain.py
@@ -28,13 +28,14 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def abstain(X: OperationNode, Y: OperationNode, threshold: float, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def abstain(X: Matrix,
+            Y: Matrix,
+            threshold: float,
+            **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'Y':Y, 'threshold':threshold}
+    params_dict = {'X': X, 'Y': Y, 'threshold': threshold}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'abstain',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'abstain',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/als.py b/src/main/python/systemds/operator/algorithm/builtin/als.py
index f57630b..15eb88f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/als.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/als.py
@@ -28,7 +28,9 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def als(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def als(X: Matrix,
+        **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Location to read the input matrix X to be factorized
     :param rank: Rank of the factorization
@@ -41,7 +43,7 @@ def als(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     :param if: FALSE thr is ignored
     :return: 'OperationNode' containing x n matrix v 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -54,6 +56,3 @@ def als(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsCG.py b/src/main/python/systemds/operator/algorithm/builtin/alsCG.py
index 6a43aaa..782fbde 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsCG.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsCG.py
@@ -28,7 +28,9 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def alsCG(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def alsCG(X: Matrix,
+          **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Location to read the input matrix X to be factorized
     :param rank: Rank of the factorization
@@ -41,7 +43,7 @@ def alsCG(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     :param if: FALSE thr is ignored
     :return: 'OperationNode' containing x n matrix v 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -54,6 +56,3 @@ def alsCG(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsDS.py b/src/main/python/systemds/operator/algorithm/builtin/alsDS.py
index e543493..df6c9b6 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsDS.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsDS.py
@@ -28,7 +28,9 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def alsDS(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def alsDS(X: Matrix,
+          **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param V: Location to read the input matrix V to be factorized
     :param L: Location to write the factor matrix L
@@ -42,7 +44,7 @@ def alsDS(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     :param if: FALSE thr is ignored
     :return: 'OperationNode' containing x n matrix r 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -55,6 +57,3 @@ def alsDS(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py b/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py
index 26a4e16..3886c30 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsPredict.py
@@ -28,12 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def alsPredict(userIDs: OperationNode, I: OperationNode, L: OperationNode, R: OperationNode):
+
+def alsPredict(userIDs: Matrix,
+               I: Matrix,
+               L: Matrix,
+               R: Matrix):
     
-    params_dict = {'userIDs':userIDs, 'I':I, 'L':L, 'R':R}
+    params_dict = {'userIDs': userIDs, 'I': I, 'L': L, 'R': R}
     return Matrix(userIDs.sds_context,
-		'alsPredict',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'alsPredict',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py b/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py
index b7cb189..6add5f9 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/alsTopkPredict.py
@@ -28,7 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def alsTopkPredict(userIDs: OperationNode, I: OperationNode, L: OperationNode, R: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def alsTopkPredict(userIDs: Matrix,
+                   I: Matrix,
+                   L: Matrix,
+                   R: Matrix,
+                   **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param userIDs: Column vector of user-ids (n x 1)
     :param I: Indicator matrix user-id x user-id to exclude from scoring
@@ -37,7 +42,7 @@ def alsTopkPredict(userIDs: OperationNode, I: OperationNode, L: OperationNode, R
     :param K: The number of top-K items
     :return: 'OperationNode' containing users (rows) & a matrix containing the top-k predicted ratings for the specified users (rows) 
     """
-    params_dict = {'userIDs':userIDs, 'I':I, 'L':L, 'R':R}
+    params_dict = {'userIDs': userIDs, 'I': I, 'L': L, 'R': R}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(userIDs.sds_context, '')
@@ -50,6 +55,3 @@ def alsTopkPredict(userIDs: OperationNode, I: OperationNode, L: OperationNode, R
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/arima.py b/src/main/python/systemds/operator/algorithm/builtin/arima.py
index decc43c..713cae0 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/arima.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/arima.py
@@ -28,7 +28,9 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def arima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def arima(X: Matrix,
+          **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: The input Matrix to apply Arima on.
     :param max_func_invoc: ?
@@ -43,11 +45,8 @@ def arima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     :param solver: solver, is either "cg" or "jacobi"
     :return: 'OperationNode' containing the calculated coefficients 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'arima',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'arima',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/bandit.py b/src/main/python/systemds/operator/algorithm/builtin/bandit.py
index cd866c3..ff6b1c0 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/bandit.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/bandit.py
@@ -28,9 +28,17 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def bandit(X_train: OperationNode, Y_train: OperationNode, metaList: Iterable, targetList: Iterable, lp: OperationNode, primitives: OperationNode, param: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def bandit(X_train: Matrix,
+           Y_train: Matrix,
+           metaList: Iterable,
+           targetList: Iterable,
+           lp: Frame,
+           primitives: Frame,
+           param: Frame,
+           **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X_train':X_train, 'Y_train':Y_train, 'metaList':metaList, 'targetList':targetList, 'lp':lp, 'primitives':primitives, 'param':param}
+    params_dict = {'X_train': X_train, 'Y_train': Y_train, 'metaList': metaList, 'targetList': targetList, 'lp': lp, 'primitives': primitives, 'param': param}
     params_dict.update(kwargs)
     
     vX_0 = Frame(X_train.sds_context, '')
@@ -47,6 +55,3 @@ def bandit(X_train: OperationNode, Y_train: OperationNode, metaList: Iterable, t
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/bivar.py b/src/main/python/systemds/operator/algorithm/builtin/bivar.py
index 9a9a04d..dfa4061 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/bivar.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/bivar.py
@@ -28,12 +28,18 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def bivar(X: OperationNode, S1: OperationNode, S2: OperationNode, T1: OperationNode, T2: OperationNode, verbose: bool):
+
+def bivar(X: Matrix,
+          S1: Matrix,
+          S2: Matrix,
+          T1: Matrix,
+          T2: Matrix,
+          verbose: bool):
     """
     :param verbose: Print bivar stats
     :return: 'OperationNode' containing  
     """
-    params_dict = {'X':X, 'S1':S1, 'S2':S2, 'T1':T1, 'T2':T2, 'verbose':verbose}
+    params_dict = {'X': X, 'S1': S1, 'S2': S2, 'T1': T1, 'T2': T2, 'verbose': verbose}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -49,6 +55,3 @@ def bivar(X: OperationNode, S1: OperationNode, S2: OperationNode, T1: OperationN
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/components.py b/src/main/python/systemds/operator/algorithm/builtin/components.py
index 386db83..d411e4c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/components.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/components.py
@@ -28,13 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def components(G: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def components(G: Matrix,
+               **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'G':G}
+    params_dict = {'G': G}
     params_dict.update(kwargs)
     return Matrix(G.sds_context,
-		'components',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'components',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py b/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py
index d124936..e9b1e1b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/confusionMatrix.py
@@ -28,13 +28,15 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def confusionMatrix(P: OperationNode, Y: OperationNode):
+
+def confusionMatrix(P: Matrix,
+                    Y: Matrix):
     """
     :param P: vector of Predictions
     :param Y: vector of Golden standard One Hot Encoded; the one hot encoded vector of actual labels
     :return: 'OperationNode' containing the confusion matrix sums of classifications & the confusion matrix averages of each true class 
     """
-    params_dict = {'P':P, 'Y':Y}
+    params_dict = {'P': P, 'Y': Y}
     
     vX_0 = Matrix(P.sds_context, '')
     vX_1 = Matrix(P.sds_context, '')
@@ -46,6 +48,3 @@ def confusionMatrix(P: OperationNode, Y: OperationNode):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cor.py b/src/main/python/systemds/operator/algorithm/builtin/cor.py
index 9c0d632..ddc4c89 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cor.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cor.py
@@ -28,12 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def cor(X: OperationNode):
+
+def cor(X: Matrix):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     return Matrix(X.sds_context,
-		'cor',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'cor',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cox.py b/src/main/python/systemds/operator/algorithm/builtin/cox.py
index ebc12c7..1d1f2f6 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cox.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cox.py
@@ -28,7 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def cox(X: OperationNode, TE: OperationNode, F: OperationNode, R: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def cox(X: Matrix,
+        TE: Matrix,
+        F: Matrix,
+        R: Matrix,
+        **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Location to read the input matrix X containing the survival data 
     :param containing: information
@@ -46,7 +51,7 @@ def cox(X: OperationNode, TE: OperationNode, F: OperationNode, R: OperationNode,
     :param mii: Max. number of inner (conjugate gradient) iterations, 0 = no max
     :return: 'OperationNode' containing a summary of some statistics of the fitted model: & matrix rt that contains the order-preserving recoded timestamps from x & which is matrix x with sorted timestamps & matrix mf that contains the column indices of x with the baseline factors removed (if available) 
     """
-    params_dict = {'X':X, 'TE':TE, 'F':F, 'R':R}
+    params_dict = {'X': X, 'TE': TE, 'F': F, 'R': R}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -67,6 +72,3 @@ def cox(X: OperationNode, TE: OperationNode, F: OperationNode, R: OperationNode,
     vX_5._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cspline.py b/src/main/python/systemds/operator/algorithm/builtin/cspline.py
index 8c2af13..e4f60bb 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cspline.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cspline.py
@@ -28,9 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def cspline(X: OperationNode, Y: OperationNode, inp_x: float, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def cspline(X: Matrix,
+            Y: Matrix,
+            inp_x: float,
+            **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'Y':Y, 'inp_x':inp_x}
+    params_dict = {'X': X, 'Y': Y, 'inp_x': inp_x}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -43,6 +47,3 @@ def cspline(X: OperationNode, Y: OperationNode, inp_x: float, **kwargs: Dict[str
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py b/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py
index b4a3d6c..3641d3a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/csplineDS.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def csplineDS(X: OperationNode, Y: OperationNode, inp_x: float):
+
+def csplineDS(X: Matrix,
+              Y: Matrix,
+              inp_x: float):
     
-    params_dict = {'X':X, 'Y':Y, 'inp_x':inp_x}
+    params_dict = {'X': X, 'Y': Y, 'inp_x': inp_x}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -42,6 +45,3 @@ def csplineDS(X: OperationNode, Y: OperationNode, inp_x: float):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/cvlm.py b/src/main/python/systemds/operator/algorithm/builtin/cvlm.py
index 410910f..c00ee59 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/cvlm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/cvlm.py
@@ -28,9 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def cvlm(X: OperationNode, y: OperationNode, k: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def cvlm(X: Matrix,
+         y: Matrix,
+         k: int,
+         **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'y':y, 'k':k}
+    params_dict = {'X': X, 'y': y, 'k': k}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -43,6 +47,3 @@ def cvlm(X: OperationNode, y: OperationNode, k: int, **kwargs: Dict[str, VALID_I
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/dbscan.py b/src/main/python/systemds/operator/algorithm/builtin/dbscan.py
index 477510b..e327c1b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/dbscan.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/dbscan.py
@@ -28,13 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def dbscan(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def dbscan(X: Matrix,
+           **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'dbscan',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'dbscan',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py b/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py
index 5bc433f..658c01a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/decisionTree.py
@@ -28,7 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def decisionTree(X: OperationNode, Y: OperationNode, R: OperationNode, verbose: bool, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def decisionTree(X: Matrix,
+                 Y: Matrix,
+                 R: Matrix,
+                 verbose: bool,
+                 **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param a: vector, other positive Integers indicate the number of categories
     :param If: not provided by default all variables are assumed to be scale
@@ -37,11 +42,8 @@ def decisionTree(X: OperationNode, Y: OperationNode, R: OperationNode, verbose:
     :param verbose: boolean specifying if the algorithm should print information while executing
     :return: 'OperationNode' containing looks at if j is an internal node, otherwise 0 & 6,7,... if j is categorical & a leaf node: number of misclassified samples reaching at node j & feature chosen for j is categorical rows 6,7,... depict the value subset chosen for j & a leaf node 1 if j is impure and the number of samples at j > threshold, otherwise 0 
     """
-    params_dict = {'X':X, 'Y':Y, 'R':R, 'verbose':verbose}
+    params_dict = {'X': X, 'Y': Y, 'R': R, 'verbose': verbose}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'decisionTree',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'decisionTree',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py b/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py
index d5292e1..0014bf7 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/discoverFD.py
@@ -28,12 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def discoverFD(X: OperationNode, Mask: OperationNode, threshold: float):
+
+def discoverFD(X: Matrix,
+               Mask: Matrix,
+               threshold: float):
     
-    params_dict = {'X':X, 'Mask':Mask, 'threshold':threshold}
+    params_dict = {'X': X, 'Mask': Mask, 'threshold': threshold}
     return Matrix(X.sds_context,
-		'discoverFD',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'discoverFD',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/dist.py b/src/main/python/systemds/operator/algorithm/builtin/dist.py
index 02c7c6e..6122871 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/dist.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/dist.py
@@ -28,12 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def dist(X: OperationNode):
+
+def dist(X: Matrix):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     return Matrix(X.sds_context,
-		'dist',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'dist',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/executePipeline.py b/src/main/python/systemds/operator/algorithm/builtin/executePipeline.py
index 38d3ac1..7fa78cd 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/executePipeline.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/executePipeline.py
@@ -28,15 +28,14 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def executePipeline(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def executePipeline(X: Matrix,
+                    **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :return: 'OperationNode' containing encoding of categorical features & features & ohe call, to call inside eval as a function & to call inside eval as a function & doing relative over-sampling & count  & replace the null with default values & version of pca 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'executePipeline',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'executePipeline',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py b/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py
index 761e5c5..5f35c95 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gaussianClassifier.py
@@ -24,21 +24,25 @@
 
 from typing import Dict, Iterable
 
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn
+from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def gaussianClassifier(D: OperationNode, C: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def gaussianClassifier(D: Matrix,
+                       C: Matrix,
+                       **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param varSmoothing: Smoothing factor for variances
     :param verbose: Print accuracy of the training set
     :return: 'OperationNode' containing  
     """
-    params_dict = {'D':D, 'C':C}
+    params_dict = {'D': D, 'C': C}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(D.sds_context, '')
     vX_1 = Matrix(D.sds_context, '')
+    vX_2 = List(D.sds_context, '')
     vX_3 = Matrix(D.sds_context, '')
     output_nodes = [vX_0, vX_1, vX_2, vX_3, ]
 
@@ -50,6 +54,3 @@ def gaussianClassifier(D: OperationNode, C: OperationNode, **kwargs: Dict[str, V
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py b/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py
index 736a9b3..43ff5df 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/getAccuracy.py
@@ -28,13 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def getAccuracy(y: OperationNode, yhat: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def getAccuracy(y: Matrix,
+                yhat: Matrix,
+                **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'y':y, 'yhat':yhat}
+    params_dict = {'y': y, 'yhat': yhat}
     params_dict.update(kwargs)
     return Matrix(y.sds_context,
-		'getAccuracy',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'getAccuracy',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/glm.py b/src/main/python/systemds/operator/algorithm/builtin/glm.py
index b164815..a92e6c1 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/glm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/glm.py
@@ -28,13 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def glm(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def glm(X: Matrix,
+        Y: Matrix,
+        **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'Y':Y}
+    params_dict = {'X': X, 'Y': Y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'glm',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'glm',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gmm.py b/src/main/python/systemds/operator/algorithm/builtin/gmm.py
index f81ac4a..effeebb 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gmm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gmm.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def gmm(X: OperationNode, verbose: bool, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def gmm(X: Matrix,
+        verbose: bool,
+        **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'verbose':verbose}
+    params_dict = {'X': X, 'verbose': verbose}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -53,6 +56,3 @@ def gmm(X: OperationNode, verbose: bool, **kwargs: Dict[str, VALID_INPUT_TYPES])
     vX_6._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py
index 2b5895a..23a6397 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gmmPredict.py
@@ -28,7 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def gmmPredict(X: OperationNode, weight: OperationNode, mu: OperationNode, precisions_cholesky: OperationNode, model: str):
+
+def gmmPredict(X: Matrix,
+               weight: Matrix,
+               mu: Matrix,
+               precisions_cholesky: Matrix,
+               model: str):
     """
     :param X: Matrix X (instances to be clustered)
     :param weight: Weight of learned model
@@ -37,7 +42,7 @@ def gmmPredict(X: OperationNode, weight: OperationNode, mu: OperationNode, preci
     :param model: fitted model
     :return: 'OperationNode' containing predicted cluster labels & probabilities of belongingness & for new instances given the variance and mean of fitted data 
     """
-    params_dict = {'X':X, 'weight':weight, 'mu':mu, 'precisions_cholesky':precisions_cholesky, 'model':model}
+    params_dict = {'X': X, 'weight': weight, 'mu': mu, 'precisions_cholesky': precisions_cholesky, 'model': model}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -49,6 +54,3 @@ def gmmPredict(X: OperationNode, weight: OperationNode, mu: OperationNode, preci
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/gnmf.py b/src/main/python/systemds/operator/algorithm/builtin/gnmf.py
index ed69606..adae58e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/gnmf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/gnmf.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def gnmf(X: OperationNode, rnk: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def gnmf(X: Matrix,
+         rnk: int,
+         **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'rnk':rnk}
+    params_dict = {'X': X, 'rnk': rnk}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -43,6 +46,3 @@ def gnmf(X: OperationNode, rnk: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/hyperband.py b/src/main/python/systemds/operator/algorithm/builtin/hyperband.py
index 08d0bba..2d1681e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/hyperband.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/hyperband.py
@@ -28,9 +28,16 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def hyperband(X_train: OperationNode, y_train: OperationNode, X_val: OperationNode, y_val: OperationNode, params: Iterable, paramRanges: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def hyperband(X_train: Matrix,
+              y_train: Matrix,
+              X_val: Matrix,
+              y_val: Matrix,
+              params: Iterable,
+              paramRanges: Matrix,
+              **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X_train':X_train, 'y_train':y_train, 'X_val':X_val, 'y_val':y_val, 'params':params, 'paramRanges':paramRanges}
+    params_dict = {'X_train': X_train, 'y_train': y_train, 'X_val': X_val, 'y_val': y_val, 'params': params, 'paramRanges': paramRanges}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X_train.sds_context, '')
@@ -43,6 +50,3 @@ def hyperband(X_train: OperationNode, y_train: OperationNode, X_val: OperationNo
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py b/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
index 171ecef..72dbcbc 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
@@ -28,12 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_brightness(img_in: OperationNode, value: float, channel_max: int):
+
+def img_brightness(img_in: Matrix,
+                   value: float,
+                   channel_max: int):
     
-    params_dict = {'img_in':img_in, 'value':value, 'channel_max':channel_max}
+    params_dict = {'img_in': img_in, 'value': value, 'channel_max': channel_max}
     return Matrix(img_in.sds_context,
-		'img_brightness',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_brightness',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_crop.py b/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
index 848dbdb..701b891 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
@@ -28,12 +28,14 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_crop(img_in: OperationNode, w: int, h: int, x_offset: int, y_offset: int):
+
+def img_crop(img_in: Matrix,
+             w: int,
+             h: int,
+             x_offset: int,
+             y_offset: int):
     
-    params_dict = {'img_in':img_in, 'w':w, 'h':h, 'x_offset':x_offset, 'y_offset':y_offset}
+    params_dict = {'img_in': img_in, 'w': w, 'h': h, 'x_offset': x_offset, 'y_offset': y_offset}
     return Matrix(img_in.sds_context,
-		'img_crop',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_crop',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py b/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
index 60e55e8..5dd6a50 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
@@ -28,7 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_cutout(img_in: OperationNode, x: int, y: int, width: int, height: int, fill_value: float):
+
+def img_cutout(img_in: Matrix,
+               x: int,
+               y: int,
+               width: int,
+               height: int,
+               fill_value: float):
     """
     :param img_in: Input image as 2D matrix with top left corner at [1, 1]
     :param x: Column index of the top left corner of the rectangle (starting at 1)
@@ -38,10 +44,7 @@ def img_cutout(img_in: OperationNode, x: int, y: int, width: int, height: int, f
     :param fill_value: The value to set for the rectangle
     :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'img_in':img_in, 'x':x, 'y':y, 'width':width, 'height':height, 'fill_value':fill_value}
+    params_dict = {'img_in': img_in, 'x': x, 'y': y, 'width': width, 'height': height, 'fill_value': fill_value}
     return Matrix(img_in.sds_context,
-		'img_cutout',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_cutout',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py b/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
index 76c9613..942a2e2 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
@@ -28,16 +28,15 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_invert(img_in: OperationNode, max_value: float):
+
+def img_invert(img_in: Matrix,
+               max_value: float):
     """
     :param img_in: Input image
     :param max_value: The maximum value pixels can have
     :return: 'OperationNode' containing  
     """
-    params_dict = {'img_in':img_in, 'max_value':max_value}
+    params_dict = {'img_in': img_in, 'max_value': max_value}
     return Matrix(img_in.sds_context,
-		'img_invert',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_invert',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py b/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
index 3e1833e..8b1f495 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
@@ -28,12 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_mirror(img_in: OperationNode, horizontal_axis: bool):
+
+def img_mirror(img_in: Matrix,
+               horizontal_axis: bool):
     
-    params_dict = {'img_in':img_in, 'horizontal_axis':horizontal_axis}
+    params_dict = {'img_in': img_in, 'horizontal_axis': horizontal_axis}
     return Matrix(img_in.sds_context,
-		'img_mirror',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_mirror',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py b/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
index 3595ea4..c6f2b41 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
@@ -28,17 +28,16 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_posterize(img_in: OperationNode, bits: int):
+
+def img_posterize(img_in: Matrix,
+                  bits: int):
     """
     :param img_in: Input image
     :param bits: The number of bits keep for the values.
     :param 1: and white, 8 means every integer between 0 and 255.
     :return: 'OperationNode' containing  
     """
-    params_dict = {'img_in':img_in, 'bits':bits}
+    params_dict = {'img_in': img_in, 'bits': bits}
     return Matrix(img_in.sds_context,
-		'img_posterize',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_posterize',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py b/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
index 71ec866..5f3228c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
@@ -28,17 +28,17 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_rotate(img_in: OperationNode, radians: float, fill_value: float):
+
+def img_rotate(img_in: Matrix,
+               radians: float,
+               fill_value: float):
     """
     :param img_in: Input image as 2D matrix with top left corner at [1, 1]
     :param radians: The value by which to rotate in radian.
     :param fill_value: The background color revealed by the rotation
     :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'img_in':img_in, 'radians':radians, 'fill_value':fill_value}
+    params_dict = {'img_in': img_in, 'radians': radians, 'fill_value': fill_value}
     return Matrix(img_in.sds_context,
-		'img_rotate',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_rotate',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
index 786d6a3..6cbdc3a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
@@ -28,7 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_sample_pairing(img_in1: OperationNode, img_in2: OperationNode, weight: float):
+
+def img_sample_pairing(img_in1: Matrix,
+                       img_in2: Matrix,
+                       weight: float):
     """
     :param img_in1: First input image
     :param img_in2: Second input image
@@ -36,10 +39,7 @@ def img_sample_pairing(img_in1: OperationNode, img_in2: OperationNode, weight: f
     :param 0: img_in1, 1 means only img_in2 will be visible
     :return: 'OperationNode' containing  
     """
-    params_dict = {'img_in1':img_in1, 'img_in2':img_in2, 'weight':weight}
+    params_dict = {'img_in1': img_in1, 'img_in2': img_in2, 'weight': weight}
     return Matrix(img_in1.sds_context,
-		'img_sample_pairing',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_sample_pairing',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_shear.py b/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
index 3844992..74f1665 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
@@ -28,7 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_shear(img_in: OperationNode, shear_x: float, shear_y: float, fill_value: float):
+
+def img_shear(img_in: Matrix,
+              shear_x: float,
+              shear_y: float,
+              fill_value: float):
     """
     :param img_in: Input image as 2D matrix with top left corner at [1, 1]
     :param shear_x: Shearing factor for horizontal shearing
@@ -36,10 +40,7 @@ def img_shear(img_in: OperationNode, shear_x: float, shear_y: float, fill_value:
     :param fill_value: The background color revealed by the shearing
     :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'img_in':img_in, 'shear_x':shear_x, 'shear_y':shear_y, 'fill_value':fill_value}
+    params_dict = {'img_in': img_in, 'shear_x': shear_x, 'shear_y': shear_y, 'fill_value': fill_value}
     return Matrix(img_in.sds_context,
-		'img_shear',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_shear',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_transform.py b/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
index 4a3e476..9120568 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
@@ -28,7 +28,17 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_transform(img_in: OperationNode, out_w: int, out_h: int, a: float, b: float, c: float, d: float, e: float, f: float, fill_value: float):
+
+def img_transform(img_in: Matrix,
+                  out_w: int,
+                  out_h: int,
+                  a: float,
+                  b: float,
+                  c: float,
+                  d: float,
+                  e: float,
+                  f: float,
+                  fill_value: float):
     """
     :param img_in: Input image as 2D matrix with top left corner at [1, 1]
     :param out_w: Width of the output image
@@ -37,10 +47,7 @@ def img_transform(img_in: OperationNode, out_w: int, out_h: int, a: float, b: fl
     :param fill_value: The background of the image
     :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'img_in':img_in, 'out_w':out_w, 'out_h':out_h, 'a':a, 'b':b, 'c':c, 'd':d, 'e':e, 'f':f, 'fill_value':fill_value}
+    params_dict = {'img_in': img_in, 'out_w': out_w, 'out_h': out_h, 'a': a, 'b': b, 'c': c, 'd': d, 'e': e, 'f': f, 'fill_value': fill_value}
     return Matrix(img_in.sds_context,
-		'img_transform',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_transform',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_translate.py b/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
index 8725b14..99247f5 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
@@ -28,7 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def img_translate(img_in: OperationNode, offset_x: float, offset_y: float, out_w: int, out_h: int, fill_value: float):
+
+def img_translate(img_in: Matrix,
+                  offset_x: float,
+                  offset_y: float,
+                  out_w: int,
+                  out_h: int,
+                  fill_value: float):
     """
     :param img_in: Input image as 2D matrix with top left corner at [1, 1]
     :param offset_x: The distance to move the image in x direction
@@ -38,10 +44,7 @@ def img_translate(img_in: OperationNode, offset_x: float, offset_y: float, out_w
     :param fill_value: The background of the image
     :return: 'OperationNode' containing output image as 2d matrix with top left corner at [1, 1] 
     """
-    params_dict = {'img_in':img_in, 'offset_x':offset_x, 'offset_y':offset_y, 'out_w':out_w, 'out_h':out_h, 'fill_value':fill_value}
+    params_dict = {'img_in': img_in, 'offset_x': offset_x, 'offset_y': offset_y, 'out_w': out_w, 'out_h': out_h, 'fill_value': fill_value}
     return Matrix(img_in.sds_context,
-		'img_translate',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'img_translate',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py
index fc306bf..bd24bb0 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByFD.py
@@ -28,13 +28,15 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def imputeByFD(X: OperationNode, sourceAttribute: int, targetAttribute: int, threshold: float, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def imputeByFD(X: Matrix,
+               sourceAttribute: int,
+               targetAttribute: int,
+               threshold: float,
+               **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'sourceAttribute':sourceAttribute, 'targetAttribute':targetAttribute, 'threshold':threshold}
+    params_dict = {'X': X, 'sourceAttribute': sourceAttribute, 'targetAttribute': targetAttribute, 'threshold': threshold}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'imputeByFD',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'imputeByFD',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py
index 5f6e5dc..cc62789 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByMean.py
@@ -28,12 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def imputeByMean(X: OperationNode, mask: OperationNode):
+
+def imputeByMean(X: Matrix,
+                 mask: Matrix):
     
-    params_dict = {'X':X, 'mask':mask}
+    params_dict = {'X': X, 'mask': mask}
     return Matrix(X.sds_context,
-		'imputeByMean',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'imputeByMean',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py
index 3aa3103..abb806d 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByMedian.py
@@ -28,12 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def imputeByMedian(X: OperationNode, mask: OperationNode):
+
+def imputeByMedian(X: Matrix,
+                   mask: Matrix):
     
-    params_dict = {'X':X, 'mask':mask}
+    params_dict = {'X': X, 'mask': mask}
     return Matrix(X.sds_context,
-		'imputeByMedian',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'imputeByMedian',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py b/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py
index dc613fc..c6921b1 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/imputeByMode.py
@@ -28,12 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def imputeByMode(X: OperationNode):
+
+def imputeByMode(X: Matrix):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     return Matrix(X.sds_context,
-		'imputeByMode',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'imputeByMode',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/intersect.py b/src/main/python/systemds/operator/algorithm/builtin/intersect.py
index b0c2c80..5cf6b5b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/intersect.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/intersect.py
@@ -28,12 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def intersect(X: OperationNode, Y: OperationNode):
+
+def intersect(X: Matrix,
+              Y: Matrix):
     
-    params_dict = {'X':X, 'Y':Y}
+    params_dict = {'X': X, 'Y': Y}
     return Matrix(X.sds_context,
-		'intersect',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'intersect',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/km.py b/src/main/python/systemds/operator/algorithm/builtin/km.py
index ef5ea84..f4df2b5 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/km.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/km.py
@@ -28,7 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def km(X: OperationNode, TE: OperationNode, GI: OperationNode, SI: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def km(X: Matrix,
+       TE: Matrix,
+       GI: Matrix,
+       SI: Matrix,
+       **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Input matrix X containing the survival data: 
     :param number: (categorical features) for grouping and/or stratifying 
@@ -45,7 +50,7 @@ def km(X: OperationNode, TE: OperationNode, GI: OperationNode, SI: OperationNode
     :param perform: survival data across multiple groups: "none" (the default)
     :return: 'OperationNode' containing 7 consecutive columns in km corresponds to a unique combination of groups and strata in the data  & schema & whose dimension depends on the number of groups (g) and strata (s) in the data (k denotes the number  & for grouping  ,i.e., ncol(gi) and l denotes the number of factors used for stratifying, i.e., ncol(si)) & of groups and strata is equal to 1, m will have 4 columns with  & data from multiple groups available and ttype=log-rank or wilcoxon, [...]
     """
-    params_dict = {'X':X, 'TE':TE, 'GI':GI, 'SI':SI}
+    params_dict = {'X': X, 'TE': TE, 'GI': GI, 'SI': SI}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -62,6 +67,3 @@ def km(X: OperationNode, TE: OperationNode, GI: OperationNode, SI: OperationNode
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/kmeans.py b/src/main/python/systemds/operator/algorithm/builtin/kmeans.py
index 82c2a3f..823c10a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/kmeans.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/kmeans.py
@@ -28,7 +28,9 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def kmeans(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def kmeans(X: Matrix,
+           **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: The input Matrix to do KMeans on.
     :param k: Number of centroids
@@ -40,7 +42,7 @@ def kmeans(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     :param seed: The seed used for initial sampling. If set to -1 random seeds are selected.
     :return: 'OperationNode' containing the mapping of records to centroids & the output matrix with the centroids 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -53,6 +55,3 @@ def kmeans(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py b/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py
index ef85ff7..80fa3aa 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/kmeansPredict.py
@@ -28,16 +28,15 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def kmeansPredict(X: OperationNode, C: OperationNode):
+
+def kmeansPredict(X: Matrix,
+                  C: Matrix):
     """
     :param X: The input Matrix to do KMeans on.
     :param C: The input Centroids to map X onto.
     :return: 'OperationNode' containing the mapping of records to centroids 
     """
-    params_dict = {'X':X, 'C':C}
+    params_dict = {'X': X, 'C': C}
     return Matrix(X.sds_context,
-		'kmeansPredict',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'kmeansPredict',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/knnbf.py b/src/main/python/systemds/operator/algorithm/builtin/knnbf.py
index 2a7411e..b242936 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/knnbf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/knnbf.py
@@ -28,12 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def knnbf(X: OperationNode, T: OperationNode, k_value: int):
+
+def knnbf(X: Matrix,
+          T: Matrix,
+          k_value: int):
     
-    params_dict = {'X':X, 'T':T, 'k_value':k_value}
+    params_dict = {'X': X, 'T': T, 'k_value': k_value}
     return Matrix(X.sds_context,
-		'knnbf',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'knnbf',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/l2svm.py b/src/main/python/systemds/operator/algorithm/builtin/l2svm.py
index 3e7d0e6..454e751 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/l2svm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/l2svm.py
@@ -28,7 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def l2svm(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def l2svm(X: Matrix,
+          Y: Matrix,
+          **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: matrix X of feature vectors
     :param Y: matrix Y of class labels have to be a single column
@@ -41,11 +44,8 @@ def l2svm(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TY
     :param columnId: The column Id used if one wants to add a ID to the print statement, Specificly usefull when L2SVM is used in MSVM.
     :return: 'OperationNode' containing model matrix 
     """
-    params_dict = {'X':X, 'Y':Y}
+    params_dict = {'X': X, 'Y': Y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'l2svm',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'l2svm',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py
index dd0ea44..e10f749 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/l2svmPredict.py
@@ -28,14 +28,17 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def l2svmPredict(X: OperationNode, W: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def l2svmPredict(X: Matrix,
+                 W: Matrix,
+                 **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: matrix X of feature vectors to classify
     :param W: matrix of the trained variables
     :param verbose: Set to true if one wants print statements.
     :return: 'OperationNode' containing classification labels maxed to ones and zeros. 
     """
-    params_dict = {'X':X, 'W':W}
+    params_dict = {'X': X, 'W': W}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -48,6 +51,3 @@ def l2svmPredict(X: OperationNode, W: OperationNode, **kwargs: Dict[str, VALID_I
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lasso.py b/src/main/python/systemds/operator/algorithm/builtin/lasso.py
index a299180..3c40fa0 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lasso.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lasso.py
@@ -28,7 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def lasso(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def lasso(X: Matrix,
+          y: Matrix,
+          **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: input feature matrix
     :param y: matrix Y columns of the design matrix
@@ -38,11 +41,8 @@ def lasso(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TY
     :param maxi: maximum number of iterations until convergence
     :return: 'OperationNode' containing  
     """
-    params_dict = {'X':X, 'y':y}
+    params_dict = {'X': X, 'y': y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'lasso',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'lasso',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lm.py b/src/main/python/systemds/operator/algorithm/builtin/lm.py
index 7400c25..0a9ce19 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lm.py
@@ -28,7 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def lm(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def lm(X: Matrix,
+       y: Matrix,
+       **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Matrix of feature vectors.
     :param y: 1-column matrix of response values.
@@ -39,11 +42,8 @@ def lm(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES
     :param verbose: If TRUE print messages are activated
     :return: 'OperationNode' containing the model fit 
     """
-    params_dict = {'X':X, 'y':y}
+    params_dict = {'X': X, 'y': y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'lm',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'lm',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lmCG.py b/src/main/python/systemds/operator/algorithm/builtin/lmCG.py
index 7d9ef78..a2d67af 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lmCG.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lmCG.py
@@ -28,13 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def lmCG(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def lmCG(X: Matrix,
+         y: Matrix,
+         **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'y':y}
+    params_dict = {'X': X, 'y': y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'lmCG',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'lmCG',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lmDS.py b/src/main/python/systemds/operator/algorithm/builtin/lmDS.py
index de6bbee..132a32a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lmDS.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lmDS.py
@@ -28,13 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def lmDS(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def lmDS(X: Matrix,
+         y: Matrix,
+         **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'y':y}
+    params_dict = {'X': X, 'y': y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'lmDS',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'lmDS',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py
index 28bf6fe..612887b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lmPredict.py
@@ -28,13 +28,14 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def lmPredict(X: OperationNode, B: OperationNode, ytest: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def lmPredict(X: Matrix,
+              B: Matrix,
+              ytest: Matrix,
+              **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'B':B, 'ytest':ytest}
+    params_dict = {'X': X, 'B': B, 'ytest': ytest}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'lmPredict',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'lmPredict',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py b/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py
index ddd0a20..787649d 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/logSumExp.py
@@ -28,13 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def logSumExp(M: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def logSumExp(M: Matrix,
+              **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'M':M}
+    params_dict = {'M': M}
     params_dict.update(kwargs)
     return Matrix(M.sds_context,
-		'logSumExp',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'logSumExp',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/msvm.py b/src/main/python/systemds/operator/algorithm/builtin/msvm.py
index 5fca57c..918a36b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/msvm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/msvm.py
@@ -28,13 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def msvm(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def msvm(X: Matrix,
+         Y: Matrix,
+         **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'Y':Y}
+    params_dict = {'X': X, 'Y': Y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'msvm',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'msvm',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py b/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py
index 8b061cc..ec1b539 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/msvmPredict.py
@@ -28,13 +28,15 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def msvmPredict(X: OperationNode, W: OperationNode):
+
+def msvmPredict(X: Matrix,
+                W: Matrix):
     """
     :param X: matrix X of feature vectors to classify
     :param W: matrix of the trained variables
     :return: 'OperationNode' containing classification labels maxed to ones and zeros. 
     """
-    params_dict = {'X':X, 'W':W}
+    params_dict = {'X': X, 'W': W}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -46,6 +48,3 @@ def msvmPredict(X: OperationNode, W: OperationNode):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py b/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py
index 6ad34fa..c2540cc 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/multiLogReg.py
@@ -28,7 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def multiLogReg(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def multiLogReg(X: Matrix,
+                Y: Matrix,
+                **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Location to read the matrix of feature vectors
     :param Y: Location to read the matrix with category labels
@@ -40,11 +43,8 @@ def multiLogReg(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_IN
     :param verbose: flag specifying if logging information should be printed
     :return: 'OperationNode' containing betas as output for prediction 
     """
-    params_dict = {'X':X, 'Y':Y}
+    params_dict = {'X': X, 'Y': Y}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'multiLogReg',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'multiLogReg',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py b/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py
index b3d6290..6075c69 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/multiLogRegPredict.py
@@ -28,7 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def multiLogRegPredict(X: OperationNode, B: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def multiLogRegPredict(X: Matrix,
+                       B: Matrix,
+                       Y: Matrix,
+                       **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Data Matrix X
     :param B: Regression parameters betas
@@ -36,7 +40,7 @@ def multiLogRegPredict(X: OperationNode, B: OperationNode, Y: OperationNode, **k
     :param verbose: /
     :return: 'OperationNode' containing matrix m of predicted means/probabilities & predicted response vector & scalar value of accuracy 
     """
-    params_dict = {'X':X, 'B':B, 'Y':Y}
+    params_dict = {'X': X, 'B': B, 'Y': Y}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -51,6 +55,3 @@ def multiLogRegPredict(X: OperationNode, B: OperationNode, Y: OperationNode, **k
     vX_2._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/na_locf.py b/src/main/python/systemds/operator/algorithm/builtin/na_locf.py
index aacd2ab..58c3c16 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/na_locf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/na_locf.py
@@ -28,13 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def na_locf(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def na_locf(X: Matrix,
+            **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'na_locf',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'na_locf',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py b/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py
index d049531..84c4ae8 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/naiveBayes.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def naiveBayes(D: OperationNode, C: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def naiveBayes(D: Matrix,
+               C: Matrix,
+               **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'D':D, 'C':C}
+    params_dict = {'D': D, 'C': C}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(D.sds_context, '')
@@ -43,6 +46,3 @@ def naiveBayes(D: OperationNode, C: OperationNode, **kwargs: Dict[str, VALID_INP
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py b/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py
index 1f1603f..508670c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/naiveBayesPredict.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def naiveBayesPredict(X: OperationNode, P: OperationNode, C: OperationNode):
+
+def naiveBayesPredict(X: Matrix,
+                      P: Matrix,
+                      C: Matrix):
     
-    params_dict = {'X':X, 'P':P, 'C':C}
+    params_dict = {'X': X, 'P': P, 'C': C}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -42,6 +45,3 @@ def naiveBayesPredict(X: OperationNode, P: OperationNode, C: OperationNode):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/normalize.py b/src/main/python/systemds/operator/algorithm/builtin/normalize.py
index 3578830..da36cb1 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/normalize.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/normalize.py
@@ -28,12 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def normalize(X: OperationNode):
+
+def normalize(X: Matrix):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     return Matrix(X.sds_context,
-		'normalize',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'normalize',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlier.py b/src/main/python/systemds/operator/algorithm/builtin/outlier.py
index 0e3fd85..cd97cfb 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlier.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlier.py
@@ -28,12 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def outlier(X: OperationNode, opposite: bool):
+
+def outlier(X: Matrix,
+            opposite: bool):
     
-    params_dict = {'X':X, 'opposite':opposite}
+    params_dict = {'X': X, 'opposite': opposite}
     return Matrix(X.sds_context,
-		'outlier',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'outlier',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py b/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py
index 47589ab..80f1b1e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlierByArima.py
@@ -28,13 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def outlierByArima(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def outlierByArima(X: Matrix,
+                   **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'outlierByArima',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'outlierByArima',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py b/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py
index 294b53f..0a36298 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlierByIQR.py
@@ -28,13 +28,14 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def outlierByIQR(X: OperationNode, k: float, max_iterations: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def outlierByIQR(X: Matrix,
+                 k: float,
+                 max_iterations: int,
+                 **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'k':k, 'max_iterations':max_iterations}
+    params_dict = {'X': X, 'k': k, 'max_iterations': max_iterations}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'outlierByIQR',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'outlierByIQR',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py b/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py
index 848e193..38174f7 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/outlierBySd.py
@@ -28,13 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def outlierBySd(X: OperationNode, max_iterations: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def outlierBySd(X: Matrix,
+                max_iterations: int,
+                **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'max_iterations':max_iterations}
+    params_dict = {'X': X, 'max_iterations': max_iterations}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'outlierBySd',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'outlierBySd',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/pca.py b/src/main/python/systemds/operator/algorithm/builtin/pca.py
index 5fff19c..a05df0e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/pca.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/pca.py
@@ -28,7 +28,9 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def pca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def pca(X: Matrix,
+        **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Input feature matrix
     :param K: Number of reduced dimensions (i.e., columns)
@@ -36,7 +38,7 @@ def pca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     :param Scale: Indicates whether or not to scale the feature matrix
     :return: 'OperationNode' containing output dominant eigen vectors (can be used for projections) & the column means of the input, subtracted to construct the pca & the scaling of the values, to make each dimension same size. 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -53,6 +55,3 @@ def pca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/pnmf.py b/src/main/python/systemds/operator/algorithm/builtin/pnmf.py
index 7be0d1d..32a21a5 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/pnmf.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/pnmf.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def pnmf(X: OperationNode, rnk: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def pnmf(X: Matrix,
+         rnk: int,
+         **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'rnk':rnk}
+    params_dict = {'X': X, 'rnk': rnk}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -43,6 +46,3 @@ def pnmf(X: OperationNode, rnk: int, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/ppca.py b/src/main/python/systemds/operator/algorithm/builtin/ppca.py
index 4981762..466fb0b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/ppca.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/ppca.py
@@ -28,7 +28,9 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def ppca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def ppca(X: Matrix,
+         **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: n x m input feature matrix
     :param k: indicates dimension of the new vector space constructed from eigen vectors
@@ -38,7 +40,7 @@ def ppca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     :param verbose: verbose debug output
     :return: 'OperationNode' containing output feature matrix with k columns & output dominant eigen vectors (can be used for projections) 
     """
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -51,6 +53,3 @@ def ppca(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/randomForest.py b/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
index 0cc28fc..a4f61c4 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
@@ -28,7 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def randomForest(X: OperationNode, Y: OperationNode, R: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def randomForest(X: Matrix,
+                 Y: Matrix,
+                 R: Matrix,
+                 **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param X: Feature matrix X; note that X needs to be both recoded and dummy coded
     :param Y: Label matrix Y; note that Y needs to be both recoded and dummy coded
@@ -47,7 +51,7 @@ def randomForest(X: OperationNode, Y: OperationNode, R: OperationNode, **kwargs:
     :param impurity: Impurity measure: entropy or Gini (the default)
     :return: 'OperationNode' containing tree and each row contains the following information: & that leaf node j is supposed to predict & 7,8,... if j is categorical & chosen for j is categorical rows 7,8,... depict the value subset chosen for j & c containing the number of times samples are chosen in each tree of the random forest & from scale feature ids to global feature ids & from categorical feature ids to global feature ids 
     """
-    params_dict = {'X':X, 'Y':Y, 'R':R}
+    params_dict = {'X': X, 'Y': Y, 'R': R}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -64,6 +68,3 @@ def randomForest(X: OperationNode, Y: OperationNode, R: OperationNode, **kwargs:
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/scale.py b/src/main/python/systemds/operator/algorithm/builtin/scale.py
index c6017cf..7974e74 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/scale.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/scale.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def scale(X: OperationNode, center: bool, scale: bool):
+
+def scale(X: Matrix,
+          center: bool,
+          scale: bool):
     
-    params_dict = {'X':X, 'center':center, 'scale':scale}
+    params_dict = {'X': X, 'center': center, 'scale': scale}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -44,6 +47,3 @@ def scale(X: OperationNode, center: bool, scale: bool):
     vX_2._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py b/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py
index 0a95e3c..53a6ac6 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/scaleApply.py
@@ -28,12 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def scaleApply(X: OperationNode, Centering: OperationNode, ScaleFactor: OperationNode):
+
+def scaleApply(X: Matrix,
+               Centering: Matrix,
+               ScaleFactor: Matrix):
     
-    params_dict = {'X':X, 'Centering':Centering, 'ScaleFactor':ScaleFactor}
+    params_dict = {'X': X, 'Centering': Centering, 'ScaleFactor': ScaleFactor}
     return Matrix(X.sds_context,
-		'scaleApply',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'scaleApply',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/sherlock.py b/src/main/python/systemds/operator/algorithm/builtin/sherlock.py
index cbae8e7..664cd3e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/sherlock.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/sherlock.py
@@ -28,9 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def sherlock(X_train: OperationNode, y_train: OperationNode):
+
+def sherlock(X_train: Matrix,
+             y_train: Matrix):
     
-    params_dict = {'X_train':X_train, 'y_train':y_train}
+    params_dict = {'X_train': X_train, 'y_train': y_train}
     
     vX_0 = Matrix(X_train.sds_context, '')
     vX_1 = Matrix(X_train.sds_context, '')
@@ -98,6 +100,3 @@ def sherlock(X_train: OperationNode, y_train: OperationNode):
     vX_29._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py b/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py
index 91aabff..3cc6cbd 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/sherlockPredict.py
@@ -28,12 +28,40 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def sherlockPredict(X: OperationNode, cW1: OperationNode, cb1: OperationNode, cW2: OperationNode, cb2: OperationNode, cW3: OperationNode, cb3: OperationNode, wW1: OperationNode, wb1: OperationNode, wW2: OperationNode, wb2: OperationNode, wW3: OperationNode, wb3: OperationNode, pW1: OperationNode, pb1: OperationNode, pW2: OperationNode, pb2: OperationNode, pW3: OperationNode, pb3: OperationNode, sW1: OperationNode, sb1: OperationNode, sW2: OperationNode, sb2: OperationNode, sW3: Operation [...]
+
+def sherlockPredict(X: Matrix,
+                    cW1: Matrix,
+                    cb1: Matrix,
+                    cW2: Matrix,
+                    cb2: Matrix,
+                    cW3: Matrix,
+                    cb3: Matrix,
+                    wW1: Matrix,
+                    wb1: Matrix,
+                    wW2: Matrix,
+                    wb2: Matrix,
+                    wW3: Matrix,
+                    wb3: Matrix,
+                    pW1: Matrix,
+                    pb1: Matrix,
+                    pW2: Matrix,
+                    pb2: Matrix,
+                    pW3: Matrix,
+                    pb3: Matrix,
+                    sW1: Matrix,
+                    sb1: Matrix,
+                    sW2: Matrix,
+                    sb2: Matrix,
+                    sW3: Matrix,
+                    sb3: Matrix,
+                    fW1: Matrix,
+                    fb1: Matrix,
+                    fW2: Matrix,
+                    fb2: Matrix,
+                    fW3: Matrix,
+                    fb3: Matrix):
     
-    params_dict = {'X':X, 'cW1':cW1, 'cb1':cb1, 'cW2':cW2, 'cb2':cb2, 'cW3':cW3, 'cb3':cb3, 'wW1':wW1, 'wb1':wb1, 'wW2':wW2, 'wb2':wb2, 'wW3':wW3, 'wb3':wb3, 'pW1':pW1, 'pb1':pb1, 'pW2':pW2, 'pb2':pb2, 'pW3':pW3, 'pb3':pb3, 'sW1':sW1, 'sb1':sb1, 'sW2':sW2, 'sb2':sb2, 'sW3':sW3, 'sb3':sb3, 'fW1':fW1, 'fb1':fb1, 'fW2':fW2, 'fb2':fb2, 'fW3':fW3, 'fb3':fb3}
+    params_dict = {'X': X, 'cW1': cW1, 'cb1': cb1, 'cW2': cW2, 'cb2': cb2, 'cW3': cW3, 'cb3': cb3, 'wW1': wW1, 'wb1': wb1, 'wW2': wW2, 'wb2': wb2, 'wW3': wW3, 'wb3': wb3, 'pW1': pW1, 'pb1': pb1, 'pW2': pW2, 'pb2': pb2, 'pW3': pW3, 'pb3': pb3, 'sW1': sW1, 'sb1': sb1, 'sW2': sW2, 'sb2': sb2, 'sW3': sW3, 'sb3': sb3, 'fW1': fW1, 'fb1': fb1, 'fW2': fW2, 'fb2': fb2, 'fW3': fW3, 'fb3': fb3}
     return Matrix(X.sds_context,
-		'sherlockPredict',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'sherlockPredict',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py b/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py
index 96f5820..c78d9da 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/sigmoid.py
@@ -28,12 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def sigmoid(X: OperationNode):
+
+def sigmoid(X: Matrix):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     return Matrix(X.sds_context,
-		'sigmoid',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'sigmoid',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py b/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py
index 42fef5e..9e0f692 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/slicefinder.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def slicefinder(X: OperationNode, e: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def slicefinder(X: Matrix,
+                e: Matrix,
+                **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'e':e}
+    params_dict = {'X': X, 'e': e}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -45,6 +48,3 @@ def slicefinder(X: OperationNode, e: OperationNode, **kwargs: Dict[str, VALID_IN
     vX_2._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/smote.py b/src/main/python/systemds/operator/algorithm/builtin/smote.py
index 2084b59..8d62f73 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/smote.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/smote.py
@@ -28,13 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def smote(X: OperationNode, mask: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def smote(X: Matrix,
+          mask: Matrix,
+          **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'mask':mask}
+    params_dict = {'X': X, 'mask': mask}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'smote',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'smote',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/split.py b/src/main/python/systemds/operator/algorithm/builtin/split.py
index 1a8e306..f21572d 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/split.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/split.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def split(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def split(X: Matrix,
+          Y: Matrix,
+          **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'Y':Y}
+    params_dict = {'X': X, 'Y': Y}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -47,6 +50,3 @@ def split(X: OperationNode, Y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TY
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py b/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py
index 6eb9962..6a39965 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/splitBalanced.py
@@ -28,9 +28,13 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def splitBalanced(X: OperationNode, Y: OperationNode, splitRatio: float, verbose: bool):
+
+def splitBalanced(X: Matrix,
+                  Y: Matrix,
+                  splitRatio: float,
+                  verbose: bool):
     
-    params_dict = {'X':X, 'Y':Y, 'splitRatio':splitRatio, 'verbose':verbose}
+    params_dict = {'X': X, 'Y': Y, 'splitRatio': splitRatio, 'verbose': verbose}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -46,6 +50,3 @@ def splitBalanced(X: OperationNode, Y: OperationNode, splitRatio: float, verbose
     vX_3._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py b/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py
index 6c09dc5..5dd2bb8 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/stableMarriage.py
@@ -28,7 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def stableMarriage(P: OperationNode, A: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def stableMarriage(P: Matrix,
+                   A: Matrix,
+                   **kwargs: Dict[str, VALID_INPUT_TYPES]):
     """
     :param P: proposer matrix P.
     :param It: a square matrix with no zeros.
@@ -38,11 +41,8 @@ def stableMarriage(P: OperationNode, A: OperationNode, **kwargs: Dict[str, VALID
     :param index: vice-versa (higher is better).
     :return: 'OperationNode' containing result matrix & 1 (2.0 preference value) and acceptor 2 (1.0 preference value). & 3 (2.0 preference value) and proposer 2 (1.0 preference value). & matched with proposer 3 (since [1,3] is non-zero) at a preference level of 3.0. & matched with proposer 2 (since [2,2] is non-zero) at a preference level of 3.0. & matched with proposer 1 (since [3,1] is non-zero) at a preference level of 1.0. 
     """
-    params_dict = {'P':P, 'A':A}
+    params_dict = {'P': P, 'A': A}
     params_dict.update(kwargs)
     return Matrix(P.sds_context,
-		'stableMarriage',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'stableMarriage',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/statsNA.py b/src/main/python/systemds/operator/algorithm/builtin/statsNA.py
index 2e5e5bc..db8c1f4 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/statsNA.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/statsNA.py
@@ -28,13 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def statsNA(X: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def statsNA(X: Matrix,
+            **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     params_dict.update(kwargs)
     return Matrix(X.sds_context,
-		'statsNA',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'statsNA',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/steplm.py b/src/main/python/systemds/operator/algorithm/builtin/steplm.py
index 5565b4e..95d9465 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/steplm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/steplm.py
@@ -28,9 +28,12 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def steplm(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]):
+
+def steplm(X: Matrix,
+           y: Matrix,
+           **kwargs: Dict[str, VALID_INPUT_TYPES]):
     
-    params_dict = {'X':X, 'y':y}
+    params_dict = {'X': X, 'y': y}
     params_dict.update(kwargs)
     
     vX_0 = Matrix(X.sds_context, '')
@@ -43,6 +46,3 @@ def steplm(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_T
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py b/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
index 105ec27..74b00b8 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
@@ -28,16 +28,15 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def toOneHot(X: OperationNode, numClasses: int):
+
+def toOneHot(X: Matrix,
+             numClasses: int):
     """
     :param X: vector with N integer entries between 1 and numClasses
     :param numclasses: number of columns, must be >= largest value in X
     :return: 'OperationNode' containing matrix with shape (n, numclasses) 
     """
-    params_dict = {'X':X, 'numClasses':numClasses}
+    params_dict = {'X': X, 'numClasses': numClasses}
     return Matrix(X.sds_context,
-		'toOneHot',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'toOneHot',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py b/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
index f9d565e..e2e020c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/tomeklink.py
@@ -28,13 +28,15 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def tomeklink(X: OperationNode, y: OperationNode):
+
+def tomeklink(X: Matrix,
+              y: Matrix):
     """
     :param X: Data Matrix (nxm)
     :param y: Label Matrix (nx1)
     :return: 'OperationNode' containing  
     """
-    params_dict = {'X':X, 'y':y}
+    params_dict = {'X': X, 'y': y}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -48,6 +50,3 @@ def tomeklink(X: OperationNode, y: OperationNode):
     vX_2._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm/builtin/univar.py b/src/main/python/systemds/operator/algorithm/builtin/univar.py
index bf165c2..070a49a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/univar.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/univar.py
@@ -28,12 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def univar(X: OperationNode, types: OperationNode):
+
+def univar(X: Matrix,
+           types: Matrix):
     
-    params_dict = {'X':X, 'types':types}
+    params_dict = {'X': X, 'types': types}
     return Matrix(X.sds_context,
-		'univar',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'univar',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py b/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py
index 065e9c5..0a54b2d 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/vectorToCsv.py
@@ -28,12 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def vectorToCsv(mask: OperationNode):
+
+def vectorToCsv(mask: Matrix):
     
-    params_dict = {'mask':mask}
+    params_dict = {'mask': mask}
     return Matrix(mask.sds_context,
-		'vectorToCsv',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'vectorToCsv',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/winsorize.py b/src/main/python/systemds/operator/algorithm/builtin/winsorize.py
index 6133e75..335d01b 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/winsorize.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/winsorize.py
@@ -28,12 +28,11 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def winsorize(X: OperationNode, verbose: bool):
+
+def winsorize(X: Matrix,
+              verbose: bool):
     
-    params_dict = {'X':X, 'verbose':verbose}
+    params_dict = {'X': X, 'verbose': verbose}
     return Matrix(X.sds_context,
-		'winsorize',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'winsorize',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py b/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py
index b2fcbbf..8615319 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/xdummy1.py
@@ -28,12 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def xdummy1(X: OperationNode):
+
+def xdummy1(X: Matrix):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     return Matrix(X.sds_context,
-		'xdummy1',
-		named_input_nodes=params_dict)
-
-
-    
\ No newline at end of file
+        'xdummy1',
+        named_input_nodes=params_dict)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py b/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py
index d91b1c9..b99c3f9 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/xdummy2.py
@@ -28,9 +28,10 @@ from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, S
 from systemds.script_building.dag import OutputType
 from systemds.utils.consts import VALID_INPUT_TYPES
 
-def xdummy2(X: OperationNode):
+
+def xdummy2(X: Matrix):
     
-    params_dict = {'X':X}
+    params_dict = {'X': X}
     
     vX_0 = Matrix(X.sds_context, '')
     vX_1 = Matrix(X.sds_context, '')
@@ -42,6 +43,3 @@ def xdummy2(X: OperationNode):
     vX_1._unnamed_input_nodes = [op]
 
     return op
-
-
-    
\ No newline at end of file