85 Commits

Author SHA1 Message Date
david-cortes
bc9ea62ec0
[R] Make xgb.cv work with xgb.DMatrix only, adding support for survival and ranking fields (#10031)
---------

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2024-03-31 21:53:00 +08:00
Michael Mayer
e0f890ba28
[R] deprecate watchlist (#10110) 2024-03-13 17:02:34 +08:00
david-cortes
b023a253b4
[R] Rename watchlist -> evals (#10032) 2024-03-10 06:48:06 +08:00
david-cortes
2c12b956da
[R] Refactor callback structure and attributes (#9957) 2024-03-01 15:57:47 +08:00
david-cortes
c5d0608057
[R] Remove parameters and attributes related to ntree and rebase iterationrange (#9935) 2024-01-21 00:56:57 +08:00
david-cortes
d3a8d284ab
[R] On-demand serialization + standardization of attributes (#9924)
---------

Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
2024-01-11 05:08:42 +08:00
david-cortes
bed0349954
[R] Don't write files to user's directory (#9966) 2024-01-09 03:43:48 +08:00
david-cortes
9e33a10202
[R] Replace xgboost() with xgb.train() in most tests and examples (#9941) 2024-01-02 21:20:01 +08:00
david-cortes
1de3f4135c
[R] Enable vector-valued parameters (#9849) 2023-12-06 20:32:20 +08:00
david-cortes
62571b79eb
[R] Enable multi-output objectives (#9839) 2023-12-06 03:13:14 +08:00
Jiaming Yuan
be6a552956
[R] Support multi-class custom objective. (#9526) 2023-08-29 08:27:13 +08:00
Jiaming Yuan
972730cde0
Use matrix for gradient. (#9508)
- Use the `linalg::Matrix` for storing gradients.
- New API for the custom objective.
- Custom objective for multi-class/multi-target is now required to return the correct shape.
- Custom objective for Python can accept arrays with any strides. (row-major, column-major)
2023-08-24 05:29:52 +08:00
James Lamb
44bd2981b2
[R] remove default values in internal utility functions (#9457) 2023-08-10 21:40:59 +08:00
James Lamb
0d8248ddcd
[R] discourage use of regex for fixed string comparisons (#8736) 2023-01-30 18:47:21 +08:00
James Lamb
fbe40d00d8
[R] resolve brace_linter warnings (#8564) 2022-12-08 23:01:00 +08:00
Jiaming Yuan
b56614e9b8
[R] Use new predict function. (#6819)
* Call new C prediction API.
* Add `strict_shape`.
* Add `iterationrange`.
* Update document.
2021-06-11 13:03:29 +08:00
Andrew Ziem
3e7e426b36
Fix spelling in documents (#6948)
* Update roxygen2 doc.

Co-authored-by: fis <jm.yuan@outlook.com>
2021-05-11 20:44:36 +08:00
Philip Hyunsu Cho
e426b6e040
[R] Do not convert continuous labels to factors (#6380)
* [R] Do not convert continuous labels to factors

* Address reviewer's comment
2020-11-17 09:19:16 -08:00
James Lamb
3cca1c5fa1
[R] remove uses of exists() (#6387) 2020-11-17 15:06:23 +08:00
Vitalie Spinu
1453bee3e7
[R] Remove stringi dependency (#6109)
* [R] Fix empty empty tests and a test warnings

* [R] Remove stringi dependency (fix #5905)

* Fix R lint check

* [R] Fix automatic conversion to factor in R < 4.0.0 in xgb.model.dt.tree

* Add `R` Makefile variable

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2020-09-12 13:18:08 -07:00
Tong He
3912f3de06
Updates from 1.2.0 cran submission (#6077)
* update for 1.2.0 cran submission

* recover cmakelists

* fix unittest from the shap PR

* trigger CI
2020-09-02 20:50:23 +08:00
Philip Hyunsu Cho
5a2dcd1c33
[R] Provide better guidance for persisting XGBoost model (#5964)
* [R] Provide better guidance for persisting XGBoost model

* Update saving_model.rst

* Add a paragraph about xgb.serialize()
2020-07-31 20:00:26 -07:00
Jiaming Yuan
18349a7ccf
[Breaking] Fix custom metric for multi output. (#5954)
* Set output margin to true for custom metric.  This fixes only R and Python.
2020-07-29 19:25:27 +08:00
Philip Hyunsu Cho
ace7fd328b
[R] Add a compatibility layer to load Booster object from an old RDS file (#5940)
* [R] Add a compatibility layer to load Booster from an old RDS
* Modify QuantileHistMaker::LoadConfig() to be backward compatible with 1.1.x
* Add a big warning about compatibility in QuantileHistMaker::LoadConfig()
* Add testing suite
* Discourage use of saveRDS() in CRAN doc
2020-07-26 00:06:49 -07:00
Jiaming Yuan
bc1d3ee230
Fix r early stop with custom objective. (#5923)
* Specify `ntreelimit`.
2020-07-23 03:28:17 +08:00
Jiaming Yuan
8b1afce316
Add Github Action for R. (#5911)
* Fix lintr errors.
2020-07-20 19:23:36 +08:00
Jiaming Yuan
9c1103e06c
[Breaking] Set output margin to True for custom objective. (#5564)
* Set output margin to True for custom objective in Python and R.

* Add a demo for writing multi-class custom objective function.

* Run tests on selected demos.
2020-04-20 20:44:12 +08:00
James Lamb
4b7e2b7bff
[R-package] fixed uses of class() (#5426)
Thank you a lot. Good catch!
2020-03-20 14:51:20 +01:00
Kodi Arfer
f100b8d878 [Breaking] Don't drop trees during DART prediction by default (#5115)
* Simplify DropTrees calling logic

* Add `training` parameter for prediction method.

* [Breaking]: Add `training` to C API.

* Change for R and Python custom objective.

* Correct comment.

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
2020-01-13 21:48:30 +08:00
Jiaming Yuan
29a1356669
Deprecate reg:linear' in favor of reg:squarederror'. (#4267)
* Deprecate `reg:linear' in favor of `reg:squarederror'.
* Replace the use of `reg:linear'.
* Replace the use of `silent`.
2019-03-17 17:55:04 +08:00
jakehoare
7707982a85 Amend xgb.createFolds to handle classes of a single element. (#3630)
* Amend xgb.createFolds to handle classes of a single element.

* Fix variable name
2018-09-12 09:23:05 -05:00
Andrew Thia
9254c58e4d [TREE] add interaction constraints (#3466)
* add interaction constraints

* enable both interaction and monotonic constraints at the same time

* fix lint

* add R test, fix lint, update demo

* Use dmlc::JSONReader to express interaction constraints as nested lists; Use sparse arrays for bookkeeping

* Add Python test for interaction constraints

* make R interaction constraints parameter based on feature index instead of column names, fix R coding style

* Fix lint

* Add BlueTea88 to CONTRIBUTORS.md

* Short circuit when no constraint is specified; address review comments

* Add tutorial for feature interaction constraints

* allow interaction constraints to be passed as string, remove redundant column_names argument

* Fix typo

* Address review comments

* Add comments to Python test
2018-09-04 09:35:39 -07:00
Bernie Gray
cd7659937b [R] many minor changes to increase the robustness of the R code (#2404)
* many minor changes to increase robustness of R code

* fixing which mistake in xgb.model.dt.tree.R and a few cosmetics
2017-06-15 22:56:23 -05:00
Vadim Khotilovich
c66ca79221 [R] native routines registration (#2290)
* [R] add native routines registration

* c_api.h needs to include <cstdint> since it uses fixed width integer types

* [R] use registered native routines from R code

* [R] bump version; add info on native routine registration to the contributors guide

* make lint happy
2017-05-14 11:00:46 -07:00
Vadim Khotilovich
a375ad2822 [R] maintenance Apr 2017 (#2237)
* [R] make sure things work for a single split model; fixes #2191

* [R] add option use_int_id to xgb.model.dt.tree

* [R] add example of exporting tree plot to a file

* [R] set save_period = NULL as default in xgboost() to be the same as in xgb.train; fixes #2182

* [R] it's a good practice after CRAN releases to bump up package version in dev

* [R] allow xgb.DMatrix construction from integer dense matrices

* [R] xgb.DMatrix: silent parameter; improve documentation

* [R] xgb.model.dt.tree code style changes

* [R] update NEWS with parameter changes

* [R] code safety & style; handle non-strict matrix and inherited classes of input and model; fixes #2242

* [R] change to x.y.z.p R-package versioning scheme and set version to 0.6.4.3

* [R] add an R package versioning section to the contributors guide

* [R] R-package/README.md: clean up the redundant old installation instructions, link the contributors guide
2017-05-01 22:51:34 -07:00
Vadim Khotilovich
d7406e07f3 [R] xgb.plot.tree fixes (#1939)
* [R] a few fixes and improvements to xgb.plot.tree

* [R] deprecate n_first_tree replace with trees; fix types in xgb.model.dt.tree
2017-01-06 11:09:51 -08:00
Tong He
4733357278 [R] Monotonic Constraints in Tree Construction (#1557)
* fix cran check

* change required R version because of utils::globalVariables

* temporary commit, monotone not working

* fix test

* fix doc

* fix doc
2016-09-11 22:16:33 -07:00
Vadim Khotilovich
bdfa8c0e09 [R-package] a few fixes for R (#1485)
* [R] fix #1465

* [R] add sanity check to fix #1434

* [R] some clean-ups for custom obj&eval; require maximize only for early stopping
2016-08-20 05:09:03 -05:00
Vadim Khotilovich
d5c143367d [R-package] GPL2 dependency reduction and some fixes (#1401)
* [R] do not remove zero coefficients from gblinear dump

* [R] switch from stringr to stringi

* fix #1399

* [R] separate ggplot backend, add base r graphics, cleanup, more plots, tests

* add missing include in amalgamation - fixes building R package in linux

* add forgotten file

* [R] fix DESCRIPTION

* [R] fix travis check issue and some cleanup
2016-07-27 00:05:04 -07:00
Vadim Khotilovich
c342614a81 [R] add parameter deprecation related utilities; code style 2016-06-27 01:49:51 -05:00
Vadim Khotilovich
422b0000a8 R-callbacks refactor 2016-06-09 02:46:13 -05:00
Vadim Khotilovich
71f402ac16 convert S4 to S3; add some extra methods to DMatrix 2016-03-27 19:22:22 -05:00
Tong He
4db3dfee7d Update utils.R 2015-11-08 18:08:51 -08:00
terrytangyuan
5b9e071c18 Fix travis build (+1 squashed commit)
Squashed commits:
[9240d5f] Fix Travis build
2015-10-29 00:28:53 -04:00
terrytangyuan
6024480400 Fixed most of the lint issues 2015-10-28 23:24:17 -04:00
terrytangyuan
8bae715994 Lint fix on infix operators 2015-10-28 23:04:45 -04:00
terrytangyuan
d7fce99564 Lint fix on consistent assignment 2015-10-28 22:22:51 -04:00
terrytangyuan
537b34dc6f Code: Some Lint fixes 2015-10-24 16:43:44 -04:00
kferris
7a94bdb60c Switch missing values from 0 to NA in R package 2015-10-07 18:51:47 -04:00
unknown
3d6c831e8a add error for data.frame, add weight to xgboost 2015-09-02 21:43:23 -07:00