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/05 12:22:16 UTC
[systemml] branch master updated: [DOC] Documentation for builtin
msvm 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 9939f8c [DOC] Documentation for builtin msvm function
9939f8c is described below
commit 9939f8c729df9479adde14fd9457723daf295d4e
Author: Huma Hussain <ha...@gmail.com>
AuthorDate: Fri Jun 5 17:48:46 2020 +0530
[DOC] Documentation for builtin msvm function
Closes #936.
---
dev/docs/builtins-reference.md | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/dev/docs/builtins-reference.md b/dev/docs/builtins-reference.md
index 51b67e8..4b56fb3 100644
--- a/dev/docs/builtins-reference.md
+++ b/dev/docs/builtins-reference.md
@@ -34,6 +34,7 @@ limitations under the License.
* [`slicefinder`-Function](#slicefinder-function)
* [`normalize`-Function](#normalize-function)
* [`gnmf`-Function](#gnmf-function)
+ * [`msvm`-Function](#msvm-function)
* [`toOneHot`-Function](#toOneHOt-function)
@@ -503,3 +504,40 @@ numClasses = 5
X = round(rand(rows = 10, cols = 10, min = 1, max = numClasses))
y = toOneHot(X,numClasses)
```
+
+## `msvm`-Function
+
+The `msvm`-function implements builtin multiclass SVM with squared slack variables
+It learns one-against-the-rest binary-class classifiers by making a function call to l2SVM
+
+### Usage
+```r
+msvm(X, Y, intercept, epsilon, lamda, maxIterations, verbose)
+```
+
+
+### Arguments
+| Name | Type | Default | Description |
+| :------ | :------------- | -------- | :---------- |
+| X | Double | --- | Matrix X of feature vectors.|
+| Y | Double | --- | Matrix Y of class labels. |
+| intercept | Boolean | False | No Intercept ( If set to TRUE then a constant bias column is added to X)|
+| num_classes | Integer | 10 | Number of classes.|
+| epsilon | Double | 0.001 | Procedure terminates early if the reduction in objective function value is less than epsilon (tolerance) times the initial objective function value.|
+| lamda | Double | 1.0 | Regularization parameter (lambda) for L2 regularization|
+| maxIterations | Integer | 100 | Maximum number of conjugate gradient iterations|
+| verbose | Boolean | False | Set to true to print while training.|
+
+
+### Returns
+| Name | Type | Default | Description |
+| :------ | :------------- | -------- | :---------- |
+| model | Double | --- | Model matrix. |
+
+
+### Example
+```r
+X = rand(rows = 50, cols = 10)
+y = round(X %*% rand(rows=ncol(X), cols=1))
+model = msvm(X = X, Y = y, intercept = FALSE, epsilon = 0.005, lambda = 1.0, maxIterations = 100, verbose = FALSE)
+```