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/05 05:27:04 UTC
[GitHub] [systemml] escher-m opened a new pull request #950: [DOC] Documentation for builtin gridSearch function
escher-m opened a new pull request #950:
URL: https://github.com/apache/systemml/pull/950
I have added the screenshots of the result in the shared google doc.
----------------------------------------------------------------
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 #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #950:
URL: https://github.com/apache/systemml/pull/950
----------------------------------------------------------------
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 #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
j143 commented on pull request #950:
URL: https://github.com/apache/systemml/pull/950#issuecomment-639270740
Hi @escher-m - thank you for working on this.
1. We can paste the results here itself. Copy paste the output though.
2. Get familiar with markdown syntax in GitHub comments. (Hint: Google this line!)
:smile_cat:
----------------------------------------------------------------
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 #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
j143 commented on pull request #950:
URL: https://github.com/apache/systemml/pull/950#issuecomment-639412730
Hi @escher-m, search for the commit related to `gridsearch` in this repository, in that commit you would find some test files in .dml
----------------------------------------------------------------
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 #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
j143 commented on a change in pull request #950:
URL: https://github.com/apache/systemml/pull/950#discussion_r435903926
##########
File path: dev/docs/builtins-reference.md
##########
@@ -503,3 +504,44 @@ numClasses = 5
X = round(rand(rows = 10, cols = 10, min = 1, max = numClasses))
y = toOneHot(X,numClasses)
```
+
+## `gridSearch`-Function
+
+The `gridSearch`-function is used to find the optimal hyperparameters of
+a model which results in the most ‘accurate’ predictions.
+This function takes train and eval functions by name as well as lists of
+parameter names and vectors of their values, and returns the parameter
+combination and model that gave the best results.
+
+### Usage
+```r
+gridSearch(X, y, train, predict, params, paramValues, verbose = TRUE)
+
+```
+
+### Arguments
+| Name | Type | Default | Description |
+| :------ | :------------- | -------- | :---------- |
+| X | Matrix[Double] | required | Input Matrix of vectors. |
+| y | Matrix[Double] | required | Input Matrix of vectors. |
+| train | String | required | Specified training function. |
+| predict | String | required | Evaluation based function. |
+| params | List[String] | required | List of parameters |
+| paramValues | List[Unknown] | required | Range of values for the parameters |
+| verbose | Boolean | `TRUE` | If `TRUE` print messages are activated |
+
+### Returns
+| Type | Description |
+| :------------- | :---------- |
+| Matrix[Double] | Parameter combination |
+| Frame[Unknown] | Best results model |
+
+### Example
+```r
+X = rand (rows = 50, cols = 10)
+y = X %*% rand(rows = ncol(X), cols = 1)
+params = list("reg", "tol", "maxi")
+paramRanges = list(10^seq(0,-4), 10^seq(-5,-9), 10^seq(1,3))
+[B, opt]= gridSearch(X=X, y=y, train="lm", predict="lmPredict", params=params, paramValues=paramRanges, verbose = TRUE)
Review comment:
Is this not easier to `python` script? :smile:
----------------------------------------------------------------
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 #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
j143 commented on pull request #950:
URL: https://github.com/apache/systemml/pull/950#issuecomment-639413541
Meanwhile:
Figure out `how to work with git from commandline`. (Google this line!)
----------------------------------------------------------------
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] escher-m commented on pull request #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
escher-m commented on pull request #950:
URL: https://github.com/apache/systemml/pull/950#issuecomment-639274863
The Console output is very long. The following is a snippet of the main errors that came up
```
Caused by: org.apache.sysds.runtime.DMLRuntimeException: Function .defaultNS::lmPredict is not a builtin function.
Caused by: org.apache.sysds.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 2 and 6 -- Error evaluating instruction: CP°extfunct°.defaultNS°m_gridSearch°7°2°X=_mVar67·MATRIX·FP64°y=_mVar69·MATRIX·FP64°train=lm·SCALAR·STRING·true°predict=lmPredict·SCALAR·STRING·true°params=_Var70·LIST·UNKNOWN·false°paramValues=_Var77·LIST·UNKNOWN·false°verbose=true·SCALAR·BOOLEAN·true°B°opt
Caused by: org.apache.sysds.runtime.DMLRuntimeException: error executing function .defaultNS::m_gridSearch
Caused by: org.apache.sysds.runtime.DMLRuntimeException: ERROR: Runtime error in function program block generated from function statement block between lines 22 and 74 -- Error evaluating function program block
Caused by: org.apache.sysds.runtime.DMLRuntimeException: PARFOR: Failed to execute loop in parallel.
Caused by: org.apache.sysds.runtime.DMLRuntimeException: PARFOR: Number of executed tasks does not match the number of created tasks: tasks 0/11, iters 0/75.
```
----------------------------------------------------------------
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] escher-m commented on pull request #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
escher-m commented on pull request #950:
URL: https://github.com/apache/systemml/pull/950#issuecomment-639619431
> Hi @escher-m, search for the commit related to `gridsearch` in this repository, in that commit you would find some test files in .dml
Yes, I did that. I added the link to it in my last comment above.
----------------------------------------------------------------
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] escher-m commented on pull request #950: [DOC] Documentation for builtin gridSearch function
Posted by GitBox <gi...@apache.org>.
escher-m commented on pull request #950:
URL: https://github.com/apache/systemml/pull/950#issuecomment-639405879
In addition to the function code, I took reference from [test](https://github.com/apache/systemml/blob/master/src/test/scripts/functions/builtin/GridSearchLM.dml)
----------------------------------------------------------------
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