You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemml.apache.org by GitBox <gi...@apache.org> on 2020/06/08 05:22:26 UTC

[GitHub] [systemml] wizard-420 opened a new pull request #962: [DOC] Documentation for builtin cvlm function.

wizard-420 opened a new pull request #962:
URL: https://github.com/apache/systemml/pull/962


   please review for any changes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [systemml] j143 commented on a change in pull request #962: [DOC] Documentation for builtin cvlm function.

Posted by GitBox <gi...@apache.org>.
j143 commented on a change in pull request #962:
URL: https://github.com/apache/systemml/pull/962#discussion_r436466103



##########
File path: dev/docs/builtins-reference.md
##########
@@ -322,3 +323,40 @@ y = X %*% rand(rows=ncol(X), 1)
 w = lm(X = X, y = y)
 ress = slicefinder(X = X,W = w, Y = y,  k = 5, paq = 1, S = 2);
 ```
+## `cvlm`-Function
+
+`cvlm` function is used for cross-validation of the provided data model. This function follows Non-exhaustive cross validation  method,
+It uses lm and lmpredict functions to solve the linear regression and to predict the class of a feature vector with no intercept, no shifting, no 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 then 1 and less then 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)
+print("\n Data set \n"+toString(X)+"\n response values \n"+toString(y))
+[predict,beta]=cvlm(X=X,y=y,k=4)
+print("\n prediction \n"+toString(predict)+"\n validated data set \n"+toString(beta))
+```

Review comment:
       Well done, @wizard-420!
   Running smoothly.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [systemml] asfgit closed pull request #962: [DOC] Documentation for builtin cvlm function.

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #962:
URL: https://github.com/apache/systemml/pull/962


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [systemml] j143 commented on pull request #962: [DOC] Documentation for builtin cvlm function.

Posted by GitBox <gi...@apache.org>.
j143 commented on pull request #962:
URL: https://github.com/apache/systemml/pull/962#issuecomment-643600772


   Thank you, @wizard-420 - LGTM. 👍 
   🎉 🚀


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org