Skip to content

Commit 151a32f

Browse files
authored
[MINOR][DOC] xgboost function y parameter correct usage (apache#1532)
1 parent 4eb1db5 commit 151a32f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/site/builtins-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,7 @@ M = xgboost(X = X, y = y, R = R, sml_type = 1, num_trees = 3, learning_rate = 0.
24192419
| NAME | TYPE | DEFAULT | Description |
24202420
| :------ | :------------- | -------- | :---------- |
24212421
| X | Matrix[Double] | --- | Feature matrix X; categorical features needs to be one-hot-encoded |
2422-
| Y | Matrix[Double] | --- | Label matrix Y |
2422+
| y | Matrix[Double] | --- | Label matrix y |
24232423
| R | Matrix[Double] | --- | Matrix R; 1xn vector which for each feature in X contains the following information |
24242424
| | | | - R[,2]: 1 (scalar feature) |
24252425
| | | | - R[,1]: 2 (categorical feature) |
@@ -2448,7 +2448,7 @@ Y = matrix("1.0
24482448
7.0
24492449
8.0", rows=5, cols=1)
24502450
R = matrix("1.0 1.0 1.0 1.0 1.0", rows=1, cols=5)
2451-
M = xgboost(X = X, Y = Y, R = R)
2451+
M = xgboost(X = X, y = Y, R = R)
24522452
```
24532453

24542454

@@ -2499,6 +2499,6 @@ Y = matrix("1.0
24992499
7.0
25002500
8.0", rows=5, cols=1)
25012501
R = matrix("1.0 1.0 1.0 1.0 1.0", rows=1, cols=5)
2502-
M = xgboost(X = X, Y = Y, R = R, num_trees = 10, learning_rate = 0.4)
2502+
M = xgboost(X = X, y = Y, R = R, num_trees = 10, learning_rate = 0.4)
25032503
P = xgboostPredictRegression(X = X, M = M, learning_rate = 0.4)
25042504
```

scripts/builtin/xgboost.dml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# NAME TYPE DEFAULT MEANING
2828
# ----------------------------------------------------------------------------------------------------------------------
2929
# X Matrix[Double] --- Feature matrix X; note that X needs to be both recoded and dummy coded
30-
# Y Matrix[Double] --- Label matrix Y; note that Y needs to be both recoded and dummy coded
30+
# y Matrix[Double] --- Label matrix y; note that y needs to be both recoded and dummy coded
3131
# R Matrix[Double] Matrix Matrix R; 1xn vector which for each feature in X contains the following information
3232
# - R[,1]: 1 (scalar feature)
3333
# - R[,2]: 2 (categorical feature)

0 commit comments

Comments
 (0)