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 2020/09/02 12:43:34 UTC

[systemds] branch master updated: [DOCS] Fix typo in pca algortihm python

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


The following commit(s) were added to refs/heads/master by this push:
     new 0bdf9ac  [DOCS] Fix typo in pca algortihm python
0bdf9ac is described below

commit 0bdf9ac52e26bdb73d4a93e8294158bbe5ca070b
Author: baunsgaard <ba...@tugraz.at>
AuthorDate: Wed Sep 2 14:38:58 2020 +0200

    [DOCS] Fix typo in pca algortihm python
---
 docs/api/python/api/operator/algorithms.html     |  8 ++++++--
 docs/api/python/api/operator/operation_node.html | 10 +++++++---
 docs/api/python/api/script_building/script.html  |  1 -
 docs/api/python/searchindex.js                   |  2 +-
 src/main/python/systemds/operator/algorithm.py   |  4 ++--
 5 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/docs/api/python/api/operator/algorithms.html b/docs/api/python/api/operator/algorithms.html
index 792d78d..6f392e2 100644
--- a/docs/api/python/api/operator/algorithms.html
+++ b/docs/api/python/api/operator/algorithms.html
@@ -239,6 +239,9 @@
 <li><p><strong>avg_sample_size_per_centroid</strong> – The average number of records per centroid in the data samples.</p></li>
 </ul>
 </dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p><cite>OperationNode</cite> List containing two outputs 1. the clusters, 2 the cluster ID associated with each row in x.</p>
+</dd>
 </dl>
 </dd></dl>
 
@@ -285,10 +288,11 @@
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
-<li><p><strong>x</strong> – Input dataset to perform K-Means on.</p></li>
+<li><p><strong>x</strong> – Input dataset to perform Principal Componenet Analysis (PCA) on.</p></li>
 <li><p><strong>K</strong> – The number of reduced dimensions.</p></li>
 <li><p><strong>center</strong> – Boolean specifying if the input values should be centered.</p></li>
-<li><p><strong>scale</strong> – Boolean specifying if the input values should be scaled.</p></li>
+<li><p><strong>scale</strong> – Boolean specifying if the input values should be scaled.
+:return: <cite>OperationNode</cite> List containing two outputs 1. The dimensionality reduced X input, 2. A matrix to reduce dimensionality similarly on unseen data.</p></li>
 </ul>
 </dd>
 </dl>
diff --git a/docs/api/python/api/operator/operation_node.html b/docs/api/python/api/operator/operation_node.html
index 71cda46..420c88b 100644
--- a/docs/api/python/api/operator/operation_node.html
+++ b/docs/api/python/api/operator/operation_node.html
@@ -198,11 +198,11 @@ Therefore errors will not immediately be recognized while constructing an sequen
 </div>
 <dl class="py class">
 <dt id="systemds.operator.OperationNode">
-<em class="property">class </em><code class="sig-prename descclassname">systemds.operator.</code><code class="sig-name descname">OperationNode</code><span class="sig-paren">(</span><em class="sig-param">sds_context: SystemDSContext</em>, <em class="sig-param">operation: str</em>, <em class="sig-param">unnamed_input_nodes: Iterable[Union[DAGNode</em>, <em class="sig-param">str</em>, <em class="sig-param">int</em>, <em class="sig-param">float</em>, <em class="sig-param">bool]] = None</em>, [...]
+<em class="property">class </em><code class="sig-prename descclassname">systemds.operator.</code><code class="sig-name descname">OperationNode</code><span class="sig-paren">(</span><em class="sig-param">sds_context: SystemDSContext</em>, <em class="sig-param">operation: str</em>, <em class="sig-param">unnamed_input_nodes: Iterable[Union[DAGNode</em>, <em class="sig-param">str</em>, <em class="sig-param">int</em>, <em class="sig-param">float</em>, <em class="sig-param">bool]] = None</em>, [...]
 <dd><p>A Node representing an operation in SystemDS</p>
 <dl class="py method">
 <dt id="systemds.operator.OperationNode.__init__">
-<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">sds_context: SystemDSContext</em>, <em class="sig-param">operation: str</em>, <em class="sig-param">unnamed_input_nodes: Iterable[Union[DAGNode</em>, <em class="sig-param">str</em>, <em class="sig-param">int</em>, <em class="sig-param">float</em>, <em class="sig-param">bool]] = None</em>, <em class="sig-param">named_input_nodes: Dict[str</em>, <em class="sig-param">Union[DAGNode</em>, <em [...]
+<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">sds_context: SystemDSContext</em>, <em class="sig-param">operation: str</em>, <em class="sig-param">unnamed_input_nodes: Iterable[Union[DAGNode</em>, <em class="sig-param">str</em>, <em class="sig-param">int</em>, <em class="sig-param">float</em>, <em class="sig-param">bool]] = None</em>, <em class="sig-param">named_input_nodes: Dict[str</em>, <em class="sig-param">Union[DAGNode</em>, <em [...]
 <dd><p>Create general <cite>OperationNode</cite></p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
@@ -212,7 +212,11 @@ Therefore errors will not immediately be recognized while constructing an sequen
 <li><p><strong>unnamed_input_nodes</strong> – inputs identified by their position, not name</p></li>
 <li><p><strong>named_input_nodes</strong> – inputs with their respective parameter name</p></li>
 <li><p><strong>output_type</strong> – type of the output in DML (double, matrix etc.)</p></li>
-<li><p><strong>is_python_local_data</strong> – if the data is local in python e.g. numpy arrays</p></li>
+<li><p><strong>is_python_local_data</strong> – if the data is local in python e.g. Numpy arrays</p></li>
+<li><p><strong>number_of_outputs</strong> – If set to other value than 1 then it is expected
+that this operation node returns multiple values. If set remember to set the output_types value as well.</p></li>
+<li><p><strong>output_types</strong> – The types of output in a multi output scenario.
+Default is None, and means every multi output is a matrix.</p></li>
 </ul>
 </dd>
 </dl>
diff --git a/docs/api/python/api/script_building/script.html b/docs/api/python/api/script_building/script.html
index affa103..c2e1fe4 100644
--- a/docs/api/python/api/script_building/script.html
+++ b/docs/api/python/api/script_building/script.html
@@ -194,7 +194,6 @@
 <dd><p>DMLScript is the class used to describe our intended behavior in DML. This script can be then executed to
 get the results.</p>
 <p>TODO caching</p>
-<p>TODO multiple outputs</p>
 <p>TODO rerun with different inputs without recompilation</p>
 <dl class="py method">
 <dt id="systemds.script_building.script.DMLScript.add_code">
diff --git a/docs/api/python/searchindex.js b/docs/api/python/searchindex.js
index e26f29b..74db1aa 100644
--- a/docs/api/python/searchindex.js
+++ b/docs/api/python/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["api/context/systemds_context","api/matrix/data_gen","api/matrix/federated","api/matrix/matrix","api/onnx_systemds/convert","api/onnx_systemds/onnx_helper","api/onnx_systemds/operator_gen","api/onnx_systemds/render","api/onnx_systemds/util","api/operator/algorithms","api/operator/operation_node","api/script_building/dag","api/script_building/script","api/utils/converters","api/utils/helpers","getting_started/install","getting_started/simple_examples","guide/alg [...]
\ No newline at end of file
+Search.setIndex({docnames:["api/context/systemds_context","api/matrix/data_gen","api/matrix/federated","api/matrix/matrix","api/onnx_systemds/convert","api/onnx_systemds/onnx_helper","api/onnx_systemds/operator_gen","api/onnx_systemds/render","api/onnx_systemds/util","api/operator/algorithms","api/operator/operation_node","api/script_building/dag","api/script_building/script","api/utils/converters","api/utils/helpers","getting_started/install","getting_started/simple_examples","guide/alg [...]
\ No newline at end of file
diff --git a/src/main/python/systemds/operator/algorithm.py b/src/main/python/systemds/operator/algorithm.py
index ccae749..b06bf15 100644
--- a/src/main/python/systemds/operator/algorithm.py
+++ b/src/main/python/systemds/operator/algorithm.py
@@ -98,7 +98,7 @@ def pca(x: DAGNode, **kwargs: Dict[str, VALID_INPUT_TYPES]) -> OperationNode:
     """
     Performs PCA on the matrix input
 
-    :param x: Input dataset to perform K-Means on.
+    :param x: Input dataset to perform Principal Componenet Analysis (PCA) on.
     :param K: The number of reduced dimensions.
     :param center: Boolean specifying if the input values should be centered.
     :param scale: Boolean specifying if the input values should be scaled.
@@ -112,7 +112,7 @@ def pca(x: DAGNode, **kwargs: Dict[str, VALID_INPUT_TYPES]) -> OperationNode:
 
     if 'K' in kwargs.keys() and kwargs.get('K') < 1:
         raise ValueError(
-            "Invalid number of clusters in K means, number must be integer above 0")
+            "Invalid number of dimensions in PCA, number must be integer above 0")
 
     if 'scale' in kwargs.keys():
         if kwargs.get('scale') == True: