You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by ja...@apache.org on 2020/06/02 05:08:25 UTC

[systemml] branch master updated: [DOC] Documentation for builtin scale function

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9cbfa02  [DOC] Documentation for builtin scale function
9cbfa02 is described below

commit 9cbfa02196ff035f37f5a65bca0d7af085157c7e
Author: Parul Damalu <po...@gmail.com>
AuthorDate: Tue Jun 2 10:27:24 2020 +0530

    [DOC] Documentation for builtin scale function
    
    Closes #934.
---
 dev/docs/builtins-reference.md | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/dev/docs/builtins-reference.md b/dev/docs/builtins-reference.md
index 3627bd8..c2114dd 100644
--- a/dev/docs/builtins-reference.md
+++ b/dev/docs/builtins-reference.md
@@ -27,6 +27,7 @@ limitations under the License.
     * [`lmDS`-Function](#lmds-function)
     * [`lmCG`-Function](#lmcg-function)
     * [`lmpredict`-Function](#lmpredict-function)
+    * [`scale`-Function](#scale-function)
     * [`sigmoid`-Function](#sigmoid-function)
     * [`steplm`-Function](#steplm-function)
     * [`slicefinder`-Function](#slicefinder-function)
@@ -110,6 +111,7 @@ Note that reshape construction is not yet supported for **SPARK** execution.
 
 **DML-bodied built-in functions** are written as DML-Scripts and executed as such when called.
 
+ 
 ## `lm`-Function
 
 The `lm`-function solves linear regression using either the **direct solve method** or the **conjugate gradient algorithm**
@@ -246,6 +248,35 @@ w = lm(X = X, y = y)
 yp = lmpredict(X, w)
 ```
 
+## `scale`-Function
+
+The scale function is a generic function whose default method centers or scales the column of a numeric matrix.
+
+### Usage
+```r
+scale(X, center=TRUE, scale=TRUE)
+```
+
+### Arguments
+| Name    | Type           | Default  | Description |
+| :------ | :------------- | -------- | :---------- |
+| X       | Matrix[Double] | required | Matrix of feature vectors. |
+| center  | Boolean        | required | either a logical value or numerical value. |
+| scale   | Boolean        | required | either a logical value or numerical value. |
+
+### Returns
+| Type           | Description |
+| :------------- | :---------- |
+| Matrix[Double] | 1-column matrix of weights. |
+
+### Example
+```r
+X = rand(rows = 20, cols = 10)
+center=TRUE;
+scale=TRUE;
+Y= scale(X,center,scale)
+```
+
 ## `sigmoid`-Function
 
 The Sigmoid function is a type of activation function, and also defined as a squashing function which limit the output