Skip to content

Commit

Permalink
[MINOR][DOC] xgboost function y parameter correct usage (#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
j143 authored Feb 1, 2022
1 parent 4eb1db5 commit 151a32f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/site/builtins-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2419,7 +2419,7 @@ M = xgboost(X = X, y = y, R = R, sml_type = 1, num_trees = 3, learning_rate = 0.
| NAME | TYPE | DEFAULT | Description |
| :------ | :------------- | -------- | :---------- |
| X | Matrix[Double] | --- | Feature matrix X; categorical features needs to be one-hot-encoded |
| Y | Matrix[Double] | --- | Label matrix Y |
| y | Matrix[Double] | --- | Label matrix y |
| R | Matrix[Double] | --- | Matrix R; 1xn vector which for each feature in X contains the following information |
| | | | - R[,2]: 1 (scalar feature) |
| | | | - R[,1]: 2 (categorical feature) |
Expand Down Expand Up @@ -2448,7 +2448,7 @@ Y = matrix("1.0
7.0
8.0", rows=5, cols=1)
R = matrix("1.0 1.0 1.0 1.0 1.0", rows=1, cols=5)
M = xgboost(X = X, Y = Y, R = R)
M = xgboost(X = X, y = Y, R = R)
```


Expand Down Expand Up @@ -2499,6 +2499,6 @@ Y = matrix("1.0
7.0
8.0", rows=5, cols=1)
R = matrix("1.0 1.0 1.0 1.0 1.0", rows=1, cols=5)
M = xgboost(X = X, Y = Y, R = R, num_trees = 10, learning_rate = 0.4)
M = xgboost(X = X, y = Y, R = R, num_trees = 10, learning_rate = 0.4)
P = xgboostPredictRegression(X = X, M = M, learning_rate = 0.4)
```
2 changes: 1 addition & 1 deletion scripts/builtin/xgboost.dml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# NAME TYPE DEFAULT MEANING
# ----------------------------------------------------------------------------------------------------------------------
# X Matrix[Double] --- Feature matrix X; note that X needs to be both recoded and dummy coded
# Y Matrix[Double] --- Label matrix Y; note that Y needs to be both recoded and dummy coded
# y Matrix[Double] --- Label matrix y; note that y needs to be both recoded and dummy coded
# R Matrix[Double] Matrix Matrix R; 1xn vector which for each feature in X contains the following information
# - R[,1]: 1 (scalar feature)
# - R[,2]: 2 (categorical feature)
Expand Down

0 comments on commit 151a32f

Please sign in to comment.