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/13 09:59:38 UTC
[systemml] branch master updated: [DOC] Documentation for builtin
cvlm 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 fb9a480 [DOC] Documentation for builtin cvlm function
fb9a480 is described below
commit fb9a480261e7abf6d0610ae04e9dc6d751eb6206
Author: Supratick Dey <su...@gmail.com>
AuthorDate: Sat Jun 13 15:23:34 2020 +0530
[DOC] Documentation for builtin cvlm function
Closes #962.
---
dev/docs/builtins-reference.md | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/dev/docs/builtins-reference.md b/dev/docs/builtins-reference.md
index 8ea0e31..8b29ee9 100644
--- a/dev/docs/builtins-reference.md
+++ b/dev/docs/builtins-reference.md
@@ -24,6 +24,7 @@ limitations under the License.
* [`tensor`-Function](#tensor-function)
* [DML-Bodied Built-In functions](#dml-bodied-built-in-functions)
* [`confusionMatrix`-Function](#confusionmatrix-function)
+ * [`cvlm`-Function](#cvlm-function)
* [`glm`-Function](#glm-function)
* [`gridSearch`-Function](#gridSearch-function)
* [`img_brightness`-Function](#img_brightness-function)
@@ -162,6 +163,39 @@ y = toOneHot(X, numClasses)
[ConfusionSum, ConfusionAvg] = confusionMatrix(P=z, Y=y)
```
+## `cvlm`-Function
+
+The `cvlm`-function is used for cross-validation of the provided data model. This function follows a non-exhaustive
+cross validation method. It uses [`lm`](#lm-function) and [`lmpredict`](#lmpredict-function) functions to solve the linear
+regression and to predict the class of a feature vector with no intercept, shifting, and rescaling.
+
+### Usage
+```r
+cvlm(X, y, k)
+```
+
+### Arguments
+| Name | Type | Default | Description |
+| :--- | :------------- | :------- | :---------- |
+| X | Matrix[Double] | required | Recorded Data set into matrix |
+| y | Matrix[Double] | required | 1-column matrix of response values. |
+| k | Integer | required | Number of subsets needed, It should always be more than `1` and less than `nrow(X)` |
+| icpt | Integer | `0` | Intercept presence, shifting and rescaling the columns of X |
+| reg | Double | `1e-7` | Regularization constant (lambda) for L2-regularization. set to nonzero for highly dependant/sparse/numerous features |
+
+### Returns
+| Type | Description |
+| :------------- | :---------- |
+| Matrix[Double] | Response values |
+| Matrix[Double] | Validated data set |
+
+### Example
+```r
+X = rand (rows = 5, cols = 5)
+y = X %*% rand(rows = ncol(X), cols = 1)
+[predict, beta] = cvlm(X = X, y = y, k = 4)
+```
+
## `glm`-Function
The `glm`-function is a flexible generalization of ordinary linear regression that allows for response variables that have