Граф коммитов

634 Коммитов

Автор SHA1 Сообщение Дата
James Lamb a0d227a1d6
[R-package] fix inaccurate comments, remove unnecessary comments (#4582) 2021-09-01 16:24:30 -05:00
James Lamb 4ee6399db4
[R-package] deprecate the use of 'info' in Dataset (#4573)
* [R-package] introduce keyword arguments for Dataset properties

* adding examples

* trying to fix loading issues

* add check on use of info and fix examples

* eliminate one '...'

* Update R-package/R/lgb.Dataset.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/R/lgb.Dataset.R

* Dataset get_params() is public

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-08-31 23:14:52 -05:00
James Lamb c27ebcd8a9
[R-package] deprecate uses of '...' in Dataset slice() method (#4572)
* [R-package] deprecate uses of '...' in Dataset slice() method

* Update R-package/R/lgb.Dataset.R

* Update R-package/R/lgb.Dataset.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-08-30 12:19:00 -05:00
James Lamb 846e8954ac
[R-package] fix warnings in demos (#4569)
* [R-package] fix warnings in demos

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* fix additional params issues in multiclass and categorical_feature examples

* Update R-package/demo/multiclass.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-08-28 20:01:02 -05:00
James Lamb b4213e96cb
[R-package] fix warnings in examples (#4568)
* [R-package] fix warnings in examples

* fix silently-ignored parameter
2021-08-28 19:56:56 -05:00
James Lamb b765fa6efb
[R-package] use {testthat} SummaryReporter in tests (#4567) 2021-08-28 22:20:05 +03:00
James Lamb f5925c3f69
[R-package] remove unused code checking has_header in Dataset() (fixes #4553) (#4554) 2021-08-25 15:07:25 -05:00
James Lamb bd28a3649a
[R-package] add deprecation warnings on uses of '...' in predict() and reset_parameter() (#4548)
* [R-package] add deprecation warnings on uses of '...' in predict()

* add importFrom(utils, modifyList) in NAMESPACE
2021-08-25 09:48:05 -05:00
James Lamb 417ba19217
[docs] Clarify the fact that predict() on a file does not support saved Datasets (fixes #4034) (#4545)
* documentation changes

* add list of supported formats to error message

* add unit tests

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* update per review comments

* make references consistent

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-08-24 21:33:13 -05:00
James Lamb dbccc1e73f
[R-package] fix OpenMP checking on macOS (fixes #4131) (#4507)
* [R-package] fix OpenMP checking on macOS

* adding clang flags back

* fix detection on Mac

* remove CC since it is now unused

* use flags specific to C++11

* regenerate configure
2021-08-18 20:30:14 -05:00
James Lamb a7ff117219
[R-package] remove unused '...' in Booster constructor (#4523)
Co-authored-by: Nikita Titov <nekit94-12@hotmail.com>
2021-08-17 19:55:36 -05:00
James Lamb 2edb818848
[R-package] pass R-configured compiler flags to checks in configure (#4506)
* [R-package] pass compiler flags to checks in configure

* leave OpenMP check alone

* prefer C++11 flags

* install Matrix in valgrind tests

* one less AC_LANG() call

Co-authored-by: Nikita Titov <nekit94-12@hotmail.com>
2021-08-18 03:02:41 +03:00
James Lamb 112db8ab82
[R-package] add deprecation warnings about some uses of '...' (#4522)
Co-authored-by: Nikita Titov <nekit94-12@hotmail.com>
2021-08-17 23:37:16 +03:00
James Lamb 86ead2050c
[R-package] use C++ compiler for pre-compile checks on Windows (#4504)
* [R-package] use C++ compiler for pre-compile checks on Windows

* install Matrix in valgrind test

* Add {Matrix} in more places in CI and docs

* use CXX11

* use flags specific to C++11

* missing backtick

Co-authored-by: Nikita Titov <nekit94-12@hotmail.com>
2021-08-14 14:04:12 -05:00
James Lamb 2f3764265c
[R-package] remove unused variable `R_SCRIPT` in configure.win (#4505) 2021-08-09 15:28:31 +03:00
James Lamb 5d5f4909e5
[R-package] limit exported symbols in DLL (#4494) 2021-07-30 16:13:14 -05:00
Fabio Sigrist aacb4c8fd9
[R-package] fix protection stack imbalance and unprotected objects (fixes #4390) (#4391)
* [R-package] fix protection stack imbalance and unprotected objects issues

* [R-package] fix minor linting issues

* [ci][R-package] change timeout-minutes in valgrind test

* [R-package] remove extra space

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* [R-package] remove counter for number of protected objects

* Update .github/workflows/r_valgrind.yml

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-06-27 00:08:49 -05:00
Nikita Titov aab8fc18a2
fix param aliases (#4387) 2021-06-26 15:07:37 +03:00
Nikita Titov 0ca2c49424
[docs][R-package] add authors in R-package description (#4395)
* add authors in R-package description

* Update R-package/DESCRIPTION

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-06-21 20:09:14 -05:00
James Lamb 4167649cd5
[R-package] remove unnecessary comments (#4383)
* [R-package] remove unnecessary comments

* Update R-package/R/lgb.Booster.R
2021-06-17 03:00:36 +03:00
James Lamb 4530deda28
[R-package] consolidate duplicate lists of Dataset info keys (#4381)
* [R-package] consolidate duplicate lists of Dataset info keys

* remove extra parentheses
2021-06-16 22:43:25 +03:00
James Lamb a592316a00
[ci] [R-package] add unit tests on monotone constraints (#4352)
* [R-package] add unit tests on monotone constraints

* testing without skip()

* put skip() back

* make tests consistent with Python

* Update R-package/tests/testthat/test_basic.R

* more changes for consistency with Python tests
2021-06-15 10:46:03 -05:00
James Lamb 53ffba7c5c
[R-package] move more finalizer logic into C++ side to address memory leaks (#4353)
* [R-package] move more finalizer logic intoo C++ side

* add C finalizers

* use gc()

* put skip() back

* Update R-package/tests/testthat/test_lgb.Booster.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-06-12 23:13:05 -05:00
James Lamb f0bca1a2af
[R-package] avoid unnecessary computation of std deviations in `lgb.cv()` (#4360)
* [R-package] avoid unnecessary computation of std deviations in lgb.cv()

* use expect_equal()
2021-06-12 18:43:23 +03:00
James Lamb a8fae81fc6
[R-package] remove defaults in internal functions (#4361) 2021-06-10 00:44:19 +03:00
James Lamb 063e731794
[R-package] remove unnecessary library() calls in tests (#4354) 2021-06-08 17:23:11 -05:00
James Lamb 20e633875f
[R-package] resolve test warning about is.na() and handles (#4341) 2021-06-05 22:14:15 -05:00
James Lamb 4ccf92be4b
[R-package] factor out lgb.check.r6.class() (#4343)
* [R-package] factor out lgb.check.r6.class()

* Predictor
2021-06-05 12:00:17 -05:00
James Lamb 441f38bb81
[R-package] remove lgb.last_error() and LGBM_GetLastError_R() (#4344) 2021-06-05 07:51:48 -05:00
James Lamb 3837e60de6
[R-package] remove unused argument in early stopping callback (#4342) 2021-06-05 07:50:21 -05:00
James Lamb c45a82f034
[R-package] remove uses of ... in Predictor constructor (#4338) 2021-06-04 12:40:29 -05:00
James Lamb 2b485ce537
[R-package] remove unused code in lgb.params2str() (#4337) 2021-06-04 08:57:37 -05:00
Michael Mayer 4b1b412452
fix calculation of weighted gamma loss (fixes #4174) (#4283)
* fixed weighted gamma obj

* added unit tests

* fixing linter errors

* another linter

* set seed

* fix linter (integer seed)
2021-05-21 15:28:10 +03:00
Nikita Titov 90677e4368
[R-package] Handle integer types more accurate in R-to-C interface (#4291)
* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* Update lightgbm_R.cpp

* fix typos
2021-05-15 16:08:09 +03:00
James Lamb 676c95fb27
[R-package] manage Dataset and Booster handles as R external pointers (fixes #3016) (#4265)
* started converting handles

* more changes

* sort of working for Dataset

* yay all the tests are passing for Dataset handle changes

* working for other handle types

* remove debugging logging

* remove unnecessary spaces

* fix null logic

* more NULL

* updates

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* consolidate steps

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-05-13 00:42:39 +03:00
James Lamb a8ee487aca
[docs] remove extra spaces in comments and docs (#4269) 2021-05-10 16:32:12 +03:00
James Lamb c1d2dbe2c5
[R-package] move creation of character vectors in some methods to C++ side (#4256)
* [R-package] move creation of character vectors in some methods to C++ side

* convert LGBM_BoosterGetEvalNames_R

* convert LGBM_BoosterDumpModel_R and LGBM_BoosterSaveModelToString_R

* remove debugging code

* update docs

* remove comment

* add handling for larger model strings

* handle large strings in feature and eval names

* got long feature names working

* more fixes

* linting

* resize

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* stricter test

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-05-09 17:28:58 -05:00
James Lamb 0246721303
[docs][R-package] update docs on C++ interface (#4257)
* [R-package] update docs on C++ interface

* Update R-package/src/lightgbm_R.h

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/lightgbm_R.h

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* add missing start_iteration doc

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-05-07 02:39:33 +03:00
James Lamb ec87432591
[R-package] Use R standard routines to access character data in C++ (#4252)
* converted LGBM_BoosterSaveModel_R

* switch all other non-params cases

* handle params
2021-05-04 13:47:28 -05:00
James Lamb bb88d92ef2
[R-package] Use R standard routines to access numeric and integer array data in C++ (#4247)
* real pointer for matrix

* remove R_REAL_PTR

* remove R_INT_PTR

* add test
2021-05-03 13:59:37 -05:00
James Lamb aedfdd0d1e
[R-package] use R standard routine to access read-only ints passed to C++ (#4246)
* [R-package] replace R_AS_INT with R built-in

* update header

* more changes

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-05-03 11:10:37 -05:00
James Lamb d29f2c2af3
[R-package] move Rinternals.h closer to where it is used (#4248) 2021-05-02 18:04:23 -05:00
James Lamb 66ee29192a
[R-package] Convert LGBM_GetLastError_R to use R built-in types (#4242)
* [R-package] move some functions over to SEXP objects

* clarify comment

* remove paste0()

* fix registration table

* fix cmake builds
2021-05-02 16:23:18 -05:00
James Lamb 26cde5f513
[R-package] remove pre-allocated call_state in C++ calls (#4244) 2021-05-01 14:49:08 -05:00
James Lamb b27dcfa48f
[R-package] prevent symbol lookup conflicts (fixes #4045) (#4155)
* [R-package] prevent symbol lookup conflicts

* add unit tests

* only run test on Windows

* move to .Call() calls

* fix references

* testing registration for CMake builds

* revert NAMESPACE changes

* revert testing changes
2021-04-30 16:29:38 -05:00
James Lamb fa6d356555
[R-package] avoid misleading warnings when using interaction constraints (fixes #4108) (#4232) 2021-04-28 10:08:25 -05:00
James Lamb 5014f19f15
[R-package] fix warnings in unit tests (#4225) 2021-04-26 13:47:17 +03:00
James Lamb 1e95cb0977
[R-package] Move error handling into C++ side (#4163)
* [R-package] raise errors from C++ side

* working but a lot of warnings

* more changes

* simplify

* cleanup

* linting

* fix valgrind issues

* revert unnecessary change
2021-04-21 22:51:36 -05:00
david-cortes 13d0ceee76
[R-package] fix grammar in comments 2021-04-21 20:20:12 -05:00
James Lamb 72d7010b5a
[ci] parallelize R package installs in CI jobs (#4198)
* [ci] parallelize R package installs in CI jobs

* build 2

* build 3

* add ncpus in static_analysis
2021-04-20 16:00:42 +03:00
James Lamb 53602afa47
[R-package] clarify parameter documentation (fixes #4193) (#4202)
* [R-package] clarify parameter documentation

* fixes to braces

* linting
2021-04-19 15:41:27 -05:00
david-cortes c109a59511
[R-package] change default nrounds to 100 to match LightGBM core library default (#4197)
* use same default arguments as python

* Update R-package/R/lgb.cv.R

Changed.

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* revert change in docs

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-04-19 07:30:07 -05:00
Issac Lee e12409fd1a
[docs][R-package] Update the explanation of num_threads (fixes #4192) (#4199)
* update the explanation of num_threads in lightgbm.R

* adjusted sentences for linting.

* remove white space for lintr pass

* add note about num_thread param in files
2021-04-19 15:01:56 +03:00
david-cortes 69d02e387a
[R-package] Make returned feature importances from lgb.importance() visible by default (#4194)
* Return feature importances as visible

Feature importances are returned as invisible. I don't get why would anyone want them invisible. This PR fixes it.

* Update R-package/R/lgb.importance.R

Thanks, didn't realize that, changed now.

Co-authored-by: James Lamb <jaylamb20@gmail.com>

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-04-18 17:41:32 -05:00
James Lamb 7ea2bc4dbc
[docs] add working dir to R package docker run examples (#4190) 2021-04-17 22:45:46 -05:00
Nikita Titov b8a6f809e9
[ci] Bump version for development (#4171)
* Bump version for development

* Auto-update configure

Co-authored-by: GitHub Actions Bot <githubactionsbot@users.noreply.github.com>
2021-04-13 02:07:29 +03:00
James Lamb b8e38ec1eb
v3.2.1 release (#4169)
* v3.2.1 release

* Auto-update configure

Co-authored-by: GitHub Actions Bot <githubactionsbot@users.noreply.github.com>
2021-04-12 21:17:38 +03:00
James Lamb 5a678f6a9a
[ci] Add debian-clang-devel CI job for the R package (#4164)
* [ci] Add debian-clang-devel CI job for the R package

* [ci] Add debian-clang-devel CI job for the R package

* fixes

* fix test

* update cran-comments

* re-trigger CI

* catch warnings and notes

* fail with only a NOTE

* uncomment CI code

* remove env vars in windows tests

* Update R-package/cran-comments.md

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-04-11 21:06:11 -05:00
Nikita Titov 9388b2ecc1
[ci] use GitHub Actions to re-generate R configure (#4140)
* use GitHub Actions to re-generate R configure

* Update R-package/README.md

Co-authored-by: James Lamb <jaylamb20@gmail.com>

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-03-31 14:37:40 +03:00
Nikita Titov 69779e6a6b
[ci] build CRAN R-package on Azure with every commit and attach it to releases (#4117)
* build CRAN R-package on Azure with every commit and attach to releases

* test CI

* fix path

* revert CI test
2021-03-27 19:47:33 +03:00
James Lamb 65349b41c2
[R-package] fix typo in linear learner test (#4109) 2021-03-25 14:40:02 -05:00
Nikita Titov 6ac2ffe04a
[ci] Bump version for development (#4094)
* Update .appveyor.yml

* Update cran-comments.md

* Update VERSION.txt

* update configure

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-03-22 21:11:26 +03:00
Guolin Ke 2e54d5f518
v3.2.0 release (#3872)
* Update VERSION.txt

* update appveyor.yml and configure

* fix Appveyor builds

Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
2021-03-22 13:37:29 +03:00
Nikita Titov a9d9b1199c
store all CMake files in one place (#4087) 2021-03-21 16:36:03 +03:00
James Lamb 971b548687
[ci] upgrade R CI scripts to work on Ubuntu 20.04 (#4084)
* [ci] install additional LaTeX packages in R CI jobs

* update autoconf version

* bump upper limit on package size to 100
2021-03-19 15:00:54 +03:00
Philip Khor 9c0e477ac6
remove redundant returns (#3955) 2021-02-13 21:19:54 -06:00
Nikita Titov 045ffd9aac
Update README.md (#3922) 2021-02-07 21:03:30 -06:00
Nikita Titov ffebc43fea
[ci][R-package] run R CRAN checks on Solaris by optional workflow (#3913)
* run R CRAN checks on Solaris by optional workflow

* Update triggering_comments.yml

* Update r_solaris.yml

* Update optional_checks.yml

* Update triggering_comments.yml

* Update run_rhub_solaris_checks.R

* Update r_solaris.yml

* Update run_rhub_solaris_checks.R

* Update r_solaris.yml

* simplify code

* fix lint and address review comments
2021-02-07 03:16:44 +03:00
Nikita Titov 340229a51f
improve grouping in R API reference (#3854) 2021-01-25 12:04:20 -06:00
Philip Khor 66b96368ba
Remove duplicated return values from docs (#3850) 2021-01-25 09:39:59 -06:00
Nikita Titov 6bb6164e3c
Move compute and eigen libraries to external_libs folder (#3809)
* move all submodules to external_libs folder

* Update .Rbuildignore

* Update MANIFEST.in

* Update .appveyor.yml

* Update CMakeLists.txt

* Update build_r.R

* Update test.sh

* Update setup.py

* Update CMakeLists.txt

* Update test.sh

* Update setup.py

* Update conf.py

* Update MANIFEST.in

* Update LightGBM.vcxproj

* continue

* test

* test

* Update setup.py

* hotfix

* revert CI tests
2021-01-22 17:45:43 +03:00
James Lamb 8593f8503c
[R-package] Add GPU install options (fixes #3765) (#3779)
* [R-package] Add GPU install options (fixes #3765)

* whitespace

* linting

* Update build_r.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-01-18 20:08:20 -06:00
James Lamb 0e5eb9e372
[docs] expand documentation on 'group' for ranking task (#3772)
* [python-package] expand documentation on 'group' for ranking task

* add R package

* update Query Data section

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* fix typo in group example

* regenerate parameters

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* regenerate R docs

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-01-18 11:58:04 -06:00
Nikita Titov b2705dc49d
[R-package][tests] remove unused lines in tests for the speedup (#3783)
* remove unused params from tests for the speedup

* Update test_lgb.Booster.R
2021-01-18 18:07:03 +03:00
James Lamb ed651e8672
[R-package] enable use of trees with linear models at leaves (fixes #3319) (#3699)
* [R-package] enable use of trees with linear models at leaves (fixes #3319)

* remove problematic pragmas

* fix tests

* try to fix build scripts

* try fixing pragma check

* more pragma checks

* ok fix pragma stuff for real

* empty commit

* regenerate documentation

* try skipping test

* uncomment CI

* add note on missing value types for R

* add tests on saving and re-loading booster
2021-01-18 15:44:38 +03:00
Nikita Titov f997a0692c
[ci] improve experience with optional GitHub workflows (#3740)
* improve experience with optional GitHub workflows

* Update README.md

* Update r_artifacts.yml

* Update optional_checks.yml

* continue

* Update triggering_comments.yml

* Update README.md

* Update r_artifacts.yml

* Update r_artifacts.yml

* Update r_artifacts.yml

* Update r_valgrind.yml

* Update r_artifacts.yml

* Update r_valgrind.yml

* Update r_valgrind.yml

* Update r_valgrind.yml

* add docstrings to fix lint

* better formatting for multi-line commands
2021-01-13 21:53:19 +03:00
James Lamb 318f7faeb8
[ci] remove Travis (fixes #3519) (#3672)
* [ci] move CI jobs from Travis to Azure DevOps (fixes #3519)

* comment out other CIs to avoid wasting cycles

* try without docker

* add container back

* stop using --user in pip install

* run check-docs and lint without container

* job names

* move more jobs to Azure-hosted Linux pool

* fix PATH for check-docs

* uncomment other CI

* uncomment windows

* remove uses of maxParallel

* try moving macos-latest jobs to GitHub Actions

* fix config

* fix missing conda env

* set Python version

* remove commented-out code

* add more to GitHub Actions

* try to fix GPU

* remove static_analysis to prevent conflicts with #3726

* change workflow name

* try using ubuntu:latest docker

* fix conda

* trying to find where permissions first break

* add workaround for sudo

* please azure please

* image syntax

* more sudo

* noninteractive

* LC_ALL

* more  sudo

* more stuff

* CONDA dir

* paths

* get path

* missing CONDA

* fix path stuff

* more tests

* fix graphviz

* stuff

* more graphviz

* install xorg-libxau

* graphviz works, run more jobs

* stuff

* enable more tests

* uncomment GitHub Actions

* uncomment all other CIs

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* add travis.yml to Rbuildignore

* add Rbuildignore rule for fmt

* add libomp for clang builds

* changes from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-01-13 09:55:58 -06:00
Guangyu Zeng 3fd48864da
[R-package] Add explicit return statement to R functions. (#3703)
* add explicit return statement to functions in callback.R

* add explicit return statement to functions in lgb.Booster.R

* add explicit return statement to functions in lgb.Dataset.R

* add explicit return statement to functions in lgb.Predictor.R

* add explicit return statement to functions in lgb.cv.R

* add explicit return statement to functions in lgb.interprete.R

* add explicit return statement to functions in lgb.plot.importance.R

* add explicit return statement to functions in saveRDS.lgb.Booster.R

* add explicit return statement to functions in utils.R

* add explicit return statement to functions in lgb.plot.interpretation.R

* add explicit return statement to functions in build_r.R

* fix typo

* return(self) -> return(invisible(self))

* fix some inconsistent indention

* fix test failure

* add another return() statement

* fix linting errors
2021-01-04 20:54:52 -06:00
Nikita Titov 3fde0ce933
[docs][R-package] change obsolete wordings in R README (#3728) 2021-01-05 01:59:58 +03:00
James Lamb 98e6f719c5
[docs] [R-package] improve R-package docs on testing (#3724) 2021-01-04 15:43:11 -06:00
James Lamb aae4fe401b
[R-package] add support for non-ASCII feature names (fixes #2983) (#3647)
* [R-package] add support for non-ASCII feature names (fixes #2983)

* fix Windows
2021-01-03 13:17:48 -06:00
James Lamb 85b9daa96b
[R-package] remove broken default for `file` in readRDS / saveRDS functions (#3664)
* [R-package] remove broken default file in readRDS / saveRDS functions

* empty commit
2021-01-03 10:58:34 -06:00
James Lamb 532fa914e6
[R-package] allow access to params in Booster (#3662)
* [R-package] allow access to params in Booster

* remove unnecessary whitespace

* fix test on resetting params

* remove pytest_cache

* Update R-package/tests/testthat/test_custom_objective.R
2021-01-02 22:26:17 -06:00
James Lamb d7a384fa04
[R-package] remove unused R_AS_INT64 (#3686) 2021-01-02 19:14:01 -06:00
Belinda Trotta fcfd4132e6
Trees with linear models at leaves (#3299)
* Add Eigen library.

* Working for simple test.

* Apply changes to config params.

* Handle nan data.

* Update docs.

* Add test.

* Only load raw data if boosting=gbdt_linear

* Remove unneeded code.

* Minor updates.

* Update to work with sk-learn interface.

* Update to work with chunked datasets.

* Throw error if we try to create a Booster with an already-constructed dataset having incompatible parameters.

* Save raw data in binary dataset file.

* Update docs and fix parameter checking.

* Fix dataset loading.

* Add test for regularization.

* Fix bugs when saving and loading tree.

* Add test for load/save linear model.

* Remove unneeded code.

* Fix case where not enough leaf data for linear model.

* Simplify code.

* Speed up code.

* Speed up code.

* Simplify code.

* Speed up code.

* Fix bugs.

* Working version.

* Store feature data column-wise (not fully working yet).

* Fix bugs.

* Speed up.

* Speed up.

* Remove unneeded code.

* Small speedup.

* Speed up.

* Minor updates.

* Remove unneeded code.

* Fix bug.

* Fix bug.

* Speed up.

* Speed up.

* Simplify code.

* Remove unneeded code.

* Fix bug, add more tests.

* Fix bug and add test.

* Only store numerical features

* Fix bug and speed up using templates.

* Speed up prediction.

* Fix bug with regularisation

* Visual studio files.

* Working version

* Only check nans if necessary

* Store coeff matrix as an array.

* Align cache lines

* Align cache lines

* Preallocation coefficient calculation matrices

* Small speedups

* Small speedup

* Reverse cache alignment changes

* Change to dynamic schedule

* Update docs.

* Refactor so that linear tree learner is not a separate class.

* Add refit capability.

* Speed up

* Small speedups.

* Speed up add prediction to score.

* Fix bug

* Fix bug and speed up.

* Speed up dataload.

* Speed up dataload

* Use vectors instead of pointers

* Fix bug

* Add OMP exception handling.

* Change return type of LGBM_BoosterGetLinear to bool

* Change return type of LGBM_BoosterGetLinear back to int, only parameter type needed to change

* Remove unused internal_parent_ property of tree

* Remove unused parameter to CreateTreeLearner

* Remove reference to LinearTreeLearner

* Minor style issues

* Remove unneeded check

* Reverse temporary testing change

* Fix Visual Studio project files

* Restore LightGBM.vcxproj.filters

* Speed up

* Speed up

* Simplify code

* Update docs

* Simplify code

* Initialise storage space for max num threads

* Move Eigen to include directory and delete unused files

* Remove old files.

* Fix so it compiles with mingw

* Fix gpu tree learner

* Change AddPredictionToScore back to const

* Fix python lint error

* Fix C++ lint errors

* Change eigen to a submodule

* Update comment

* Add the eigen folder

* Try to fix build issues with eigen

* Remove eigen files

* Add eigen as submodule

* Fix include paths

* Exclude eigen files from Python linter

* Ignore eigen folders for pydocstyle

* Fix C++ linting errors

* Fix docs

* Fix docs

* Exclude eigen directories from doxygen

* Update manifest to include eigen

* Update build_r to include eigen files

* Fix compiler warnings

* Store raw feature data as float

* Use float for calculating linear coefficients

* Remove eigen directory from GLOB

* Don't compile linear model code when building R package

* Fix doxygen issue

* Fix lint issue

* Fix lint issue

* Remove uneeded code

* Restore delected lines

* Restore delected lines

* Change return type of has_raw to bool

* Update docs

* Rename some variables and functions for readability

* Make tree_learner parameter const in AddScore

* Fix style issues

* Pass vectors as const reference when setting tree properties

* Make temporary storage of serial_tree_learner mutable so we can make the object's methods const

* Remove get_raw_size, use num_numeric_features instead

* Fix typo

* Make contains_nan_ and any_nan_ properties immutable again

* Remove data_has_nan_ property of tree

* Remove temporary test code

* Make linear_tree a dataset param

* Fix lint error

* Make LinearTreeLearner a separate class

* Fix lint errors

* Fix lint error

* Add linear_tree_learner.o

* Simulate omp_get_max_threads if openmp is not available

* Update PushOneData to also store raw data.

* Cast size to int

* Fix bug in ReshapeRaw

* Speed up code with multithreading

* Use OMP_NUM_THREADS

* Speed up with multithreading

* Update to use ArrayToString

* Fix tests

* Fix test

* Fix bug introduced in merge

* Minor updates

* Update docs
2020-12-24 14:01:23 +08:00
Nikita Titov 1fb82e271d
[ci] Bump version for development (#3633)
* Update VERSION.txt

* Update .appveyor.yml

* update configure and cran-comments

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-12-09 13:27:37 +03:00
Alberto Ferreira 792c930305
Fix model locale issue and improve model R/W performance. (#3405)
* Fix LightGBM models locale sensitivity and improve R/W performance.

When Java is used, the default C++ locale is broken. This is true for
Java providers that use the C API or even Python models that require JEP.

This patch solves that issue making the model reads/writes insensitive
to such settings.
To achieve it, within the model read/write codebase:
 - C++ streams are imbued with the classic locale
 - Calls to functions that are dependent on the locale are replaced
 - The default locale is not changed!

This approach means:
 - The user's locale is never tampered with, avoiding issues such as
    https://github.com/microsoft/LightGBM/issues/2979 with the previous
    approach https://github.com/microsoft/LightGBM/pull/2891
 - Datasets can still be read according the user's locale
 - The model file has a single format independent of locale

Changes:
 - Add CommonC namespace which provides faster locale-independent versions of Common's methods
 - Model code makes conversions through CommonC
 - Cleanup unused Common methods
 - Performance improvements. Use fast libraries for locale-agnostic conversion:
   - value->string: https://github.com/fmtlib/fmt
   - string->double: https://github.com/lemire/fast_double_parser (10x
      faster double parsing according to their benchmark)

Bugfixes:
 - https://github.com/microsoft/LightGBM/issues/2500
 - https://github.com/microsoft/LightGBM/issues/2890
 - https://github.com/ninia/jep/issues/205 (as it is related to LGBM as well)

* Align CommonC namespace

* Add new external_libs/ to python setup

* Try fast_double_parser fix #1

Testing commit e09e5aad828bcb16bea7ed0ed8322e019112fdbe

If it works it should fix more LGBM builds

* CMake: Attempt to link fmt without explicit PUBLIC tag

* Exclude external_libs from linting

* Add exernal_libs to MANIFEST.in

* Set dynamic linking option for fmt.

* linting issues

* Try to fix lint includes

* Try to pass fPIC with static fmt lib

* Try CMake P_I_C option with fmt library

* [R-package] Add CMake support for R and CRAN

* Cleanup CMakeLists

* Try fmt hack to remove stdout

* Switch to header-only mode

* Add PRIVATE argument to target_link_libraries

* use fmt in header-only mode

* Remove CMakeLists comment

* Change OpenMP to PUBLIC linking in Mac

* Update fmt submodule to 7.1.2

* Use fmt in header-only-mode

* Remove fmt from CMakeLists.txt

* Upgrade fast_double_parser to v0.2.0

* Revert "Add PRIVATE argument to target_link_libraries"

This reverts commit 3dd45dde7b92531b2530ab54522bb843c56227a7.

* Address James Lamb's comments

* Update R-package/.Rbuildignore

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Upgrade to fast_double_parser v0.3.0 - Solaris support

* Use legacy code only in Solaris

* Fix lint issues

* Fix comment

* Address StrikerRUS's comments (solaris ifdef).

* Change header guards

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-12-08 21:36:24 +08:00
James Lamb 218446a59b
release 3.1.1 (#3611)
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
2020-12-08 10:06:55 +08:00
James Lamb f38f118ce2
[R-package] fix partial matching of keyword arguments in lgb.cv() (fixes #3629) (#3630)
* [ci] [R-package] fix issue with partial argument name matches

* fix partial name matches

* simpler NOTE check

* change conditions

* simplify
2020-12-07 00:28:19 -06:00
Guangyu Zeng ab0d71d699
[R-package] Update remaining internal function calls to use keyword arguments (#3617)
* update lgb.convert_with_rules.R to use keyword arguments

* update lgb.cv.R to use keyword arguments

* update lgb.importance.R to use keyword arguments

* update lgb.interprete.R to use keyword arguments

* update lgb.plot.interpretation.R to use keyword arguments

* update more internal function calls to use keyword arguments

* update more internal function calls to use keyword arguments
2020-12-01 10:07:39 -06:00
Tony Kenny 9597326eec
[R-package] construct dataset earlier in lgb.train and lgb.cv (fixes #3583) (#3598)
* construct dataset earlier in lgb.train and lgb.cv

* Update R-package/tests/testthat/test_dataset.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.cv.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.train.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/tests/testthat/test_dataset.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* fixing lint issues

* styling updates

* fix failing test

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-11-30 20:01:02 -06:00
James Lamb c02917e493
[R-package] {lightgbm} is now available on CRAN (fixes #629) (#3612)
* [R-package] {lightgbm} is now available on CRAN (fixes #629)

* more cleanup

* remove precompiled binaries section
2020-11-30 14:45:33 -06:00
Nikita Titov 3e8e24b374
[docs] Add new badges (#3610)
* Update README.md

* Update README.md

* Update README.rst
2020-11-29 18:52:38 -06:00
zenggyu 960f5b91c3
[R package] update lgb.Dataset.R to use keyword arguments (#3607)
* update lgb.Dataset.R to use keyword arguments

* minor adjustment

* Update R-package/R/lgb.Dataset.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* fix linting error

* Update R-package/R/lgb.Dataset.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

Co-authored-by: Nick Zeng <361304605@qq.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-11-29 14:38:33 -06:00
Nikita Titov 945f7bee27
[docs][R-package] fix typo (#3609) 2020-11-29 22:08:14 +03:00
James Lamb 1b8cf2d2dc
[R-package] Use command-line args to customize CMake builds (fixes #2441) (#3574)
* [R-package] Use command-line args to customize CMake builds (fixes #2441)

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-11-29 18:29:20 +03:00
James Lamb 97ece148c0
[R-package] use as.factor() instead of factor() in lgb.cv() (#3560)
* [R-package] use as.factor() instead of factor() in lgb.cv()

* comment out CIs

* Revert "comment out CIs"

This reverts commit fabaf9a92b.

* empty commit
2020-11-29 18:04:41 +03:00
Nick Zeng efa9ecf800
[R-package] Update lgb.model.dt.tree.R to use keyword arguments (#3605)
* use keyword arguments

* minor style adjustment

* Update R-package/R/lgb.model.dt.tree.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

Co-authored-by: zenggyu <zenggyu@foxmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-11-28 17:06:18 -06:00
Michael Frasco aabbb979e1
use keyword arguments for internal functions in utils.R (#3604) 2020-11-27 20:21:59 -06:00
James Lamb c5d9d2436b
[ci] test 32-bit R in CI (#3588)
* [ci] test 32-bit R in CI

* add R 3.6 Windows CRAN job

* add tests
2020-11-23 11:38:24 -06:00
James Lamb 1c5930bf1d
[R-package] Remove CLI-only objects (#3566)
* [R-package] Remove CLI-only objects

* more guards

* more guards

* variable not string

* simplify fix

* revert build_r.R changes

* move define of global_timer

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-11-21 18:06:01 +03:00
Guolin Ke 8c1260c9f8
bump version for development (#3568)
* bump version for development

* Update .appveyor.yml

* fix typos in CRAN comments

* update configure

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-11-18 11:08:07 +08:00
Guolin Ke 0b5e60dd10
3.1.0 release (#3484)
* Update VERSION.txt

* update configure

* Update .appveyor.yml

* update cran-comments

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-11-16 11:45:28 +08:00
shiyu1994 0655d67cc1
Optimization of row-wise histogram construction (#3522)
* store without offset in multi_val_dense_bin

* fix offset bug

* add comment for offset

* add comment for bin type selection

* faster operations for offset

* keep most freq bin in histogram for multi val dense

* use original feature iterators

* consider 9 cases (3 x 3) for multi val bin construction

* fix dense bin setting

* fix bin data in multi val group

* fix offset of the first feature histogram

* use float hist buf

* avx in histogram construction

* use avx for hist construction without prefetch

* vectorize bin extraction

* use only 128 vec

* use avx2

* use vectorization for sparse row wise

* add bit size for multi val dense bin

* float with no vectorization

* change multithreading strategy to dynamic

* remove intrinsic header

* fix dense multi val col copy

* remove bit size

* use large enough block size when the bin number is large

* calc min block size by sparsity

* rescale gradients

* rollback gradients scaling

* single precision histogram buffer as an option

* add float hist buffer with thread buffer

* fix setting zero in hist data

* fix hist begin pointer in tree learners

* remove debug logs

* remove omp simd

* update Makevars of R-package

* fix feature group binary storing

* two row wise for double hist buffer

* add subfeature for two row wise

* remove useless code and fix two row wise

* refactor code

* grouping the dense feature groups can get sparse multi val bin

* clean format problems

* one thread for two blocks in sep row wise

* use ordered gradients for sep row wise

* fix grad ptr

* ordered grad with combined block for sep row wise

* fix block threading

* use the same min block size

* rollback share min block size

* remove logs

* Update src/io/dataset.cpp

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>

* fix parameter description

* remove sep_row_wise

* remove check codes

* add check for empty multi val bin

* fix lint error

* rollback changes in config.h

* Apply suggestions from code review

Co-authored-by: Ubuntu <shiyu@gbdt-04.ren3kv4wanvufliwrpy4k03lsf.xx.internal.cloudapp.net>
Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
2020-11-13 23:26:38 +08:00
James Lamb 199fb23663
[R-package] fix install warning (#3552) 2020-11-10 09:51:46 -06:00
James Lamb 71a1a4f6b2
[R-package] fix learning-to-rank tests on Solaris (#3534)
* [R-package] fix learning-to-rank tests on Solaris

* Update R-package/tests/testthat/test_learning_to_rank.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-11-07 20:10:27 -06:00
James Lamb 3db7c1b741
[R-package] remove Makefile hack in install.libs.R (#3528) 2020-11-05 19:47:39 -06:00
James Lamb 9065d59cc9
[R-package] fix MM_PREFETCH and MM_MALLOC checks in configure.ac (#3510)
* [R-package] fix MM_PREFETCH and MM_MALLOC checks in configure.ac

* update gitignore
2020-10-31 23:30:38 -05:00
James Lamb 13194d2bea
[R-package] remove unused variables in configure.ac (#3509) 2020-10-31 00:16:45 -05:00
Peyara Nando f7c1a7f297
[R-package] Updated lgb.Booster.R with keyword arguments (#3496)
* Updated lgb.Booster.R with keyword arguments

-I am facing problems while generating the docs
Little help please

* Update lgb.Booster.R

* Update lgb.Booster.R

* Clean up as requested

* Update lgb.Booster.R

* Update lgb.Booster.R

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update lgb.Booster.R

* Update lgb.Booster.R

* Revert "Update lgb.Booster.R"

This reverts commit 9b81ce845e.

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update lgb.Booster.R

* Update lgb.Booster.R

* Update lgb.Booster.R

* Update lgb.Booster.R

* Update lgb.Booster.R

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Revert "Update lgb.Booster.R"

This reverts commit 4f2cc948f6.

* Update lgb.Booster.R

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update lgb.Booster.R

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update R-package/R/lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Update lgb.Booster.R

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-10-30 13:24:04 -05:00
James Lamb 88a7344c5d
[ci] automate building CRAN package (#3497)
* [ci] automate building CRAN package

* add workflow for building CRAN package

* remove newlines

* add to R README

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* add timeout

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-10-30 12:18:40 -05:00
Pavel Metrikov ba0a1f8d38
Add support to optimize for NDCG at a given truncation level (#3425)
* Add support to optimize for NDCG at a given truncation level

In order to correctly optimize for NDCG@_k_, one should exclude pairs containing both documents beyond the top-_k_ (as they don't affect NDCG@_k_ when swapped).

* Update rank_objective.hpp

* Apply suggestions from code review

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>

* Update rank_objective.hpp

remove the additional branching: get high_rank and low_rank by one "if".

* Update config.h

add description to lambdarank_truncation_level parameter

* Update Parameters.rst

* Update test_sklearn.py

update expected NDCG value for a test, as it was affected by the underlying change in the algorithm

* Update test_sklearn.py

update NDCG@3 reference value

* fix R learning-to-rank tests

* Update rank_objective.hpp

* Update include/LightGBM/config.h

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>

* Update Parameters.rst

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-10-27 19:54:49 +08:00
Anshu Trivedi 7e2f353df4
[R-package] Updated lgb.train.R with keyword arguments (#3464)
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-10-18 00:34:32 -05:00
James Lamb 81d761133f
[ci] [R-package] Fix memory leaks found by valgrind (#3443)
* fix int64 write error

* attempt

* [WIP] [ci] [R-package] Add CI job that runs valgrind tests

* update all-successful

* install

* executable

* fix redirect stuff

* Apply suggestions from code review

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>

* more flags

* add mc to msvc proj

* fix memory leak in mc

* Update monotone_constraints.hpp

* Update r_package.yml

* remove R_INT64_PTR

* disable openmp

* Update gbdt_model_text.cpp

* Update gbdt_model_text.cpp

* Apply suggestions from code review

* try to free vector

* free more memories.

* Update src/boosting/gbdt_model_text.cpp

* fix using

* try the UNPROTECT(1);

* fix a const pointer

* fix Common

* reduce UNPROTECT

* remove UNPROTECT(1);

* fix null handle

* fix predictor

* use NULL after free

* fix a leaking in test

* try more fixes

* test the effect of tests

* throw exception in Fatal

* add test back

* Apply suggestions from code review

* commet some tests

* Apply suggestions from code review

* Apply suggestions from code review

* trying to comment out tests

* Update openmp_wrapper.h

* Apply suggestions from code review

* Update configure

* Update configure.ac

* trying to uncomment

* more comments

* more uncommenting

* more uncommenting

* fix comment

* more uncommenting

* uncomment fully-commented out stuff

* try uncommenting more dataset tests

* uncommenting more tests

* ok getting closer

* more uncommenting

* free dataset

* skipping a test, more uncommenting

* more skipping

* re-enable OpenMP

* allow on OpenMP thing

* move valgrind to comment-only job

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* changes from code review

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* linting

* issue comments too

* remove issue_comment

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-10-17 23:04:14 -05:00
James Lamb 332559c0f8
[R-package] remove deprecation warnings on lgb.prepare() functions (#3444) 2020-10-17 18:47:20 +03:00
Aditya Trivedi 0c1c36cdbd
[R-package] Updated lgb.train.R with keyword arguments (#3452)
* [R-package] Updated lgb.train.R with keyword arguments

* [R-package] Updated lgb.train.R with keyword arguments

* [R-package] Updated lgb.train.R with keyword arguments
2020-10-13 12:20:10 -05:00
James Lamb 785eb60c78
[R-package] Remove ability to install precompiled lib_lightgbm (fixes #3320) (#3360)
* [R-package] [docs] Reorganize installation instructions (fixes #3320)

* more changes

* remove ability to use precompiled lib_lightgbm

* remove language about installing from the CRAN section

* move installation stuff

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* fix anchor

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-10-10 18:50:41 -05:00
James Lamb 186711deae
[R-package] miscellaneous changes to comply with CRAN requirements (#3338)
* [R-package] update DESCRIPTION per CRAN comments

* newlines

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* more fixes

* update Rbuildignore

* more changes

* more changes per CRAN response

* add email

* run examples in CI

* add newest CRAN response

* add Solaris patch

* update patch

* another attempt at ifaddrs patch

* fix unnecessary comment

* update configure

* comments

* bump version

* tabs

* fix address alignment, required by cran (#3415)

* fix dataset binary file alignment

* many fixes

* fix warnings

* fix bug

* Update file_io.cpp

* Update file_io.cpp

* simplify code

* Apply suggestions from code review

* general

* remove unneeded alignment

* Update file_io.h

* int32 to byte8 alignment

* Apply suggestions from code review

* Apply suggestions from code review

* [R-package] add new copyright holder in DESCRIPTION (#3409)

* [R-package] add new copyright holder in DESCRIPTION

* fix role

* fixing conflicts

* [R-package] add new copyright holder in DESCRIPTION (#3409)

* [R-package] add new copyright holder in DESCRIPTION

* fix role

* trying to fix conflicts

* more fixes

* this will work

* update cran-comments

* simplify solaris, add more testing docs

* stuff

* remove rchck docs

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* remove extra use of cat()

* change solaris check

* update docs

* remove testing code

* fix warning about cleanup not having execute permissions

* fix cmake builds

* remove blank line

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
2020-10-07 21:51:21 -05:00
James Lamb 2903ca0c9f
[R-package] add 'cleanup' script to handle left-behind Makevars (#3434)
* [R-package] add 'cleanup' script to handle left-behind Makevars

* always install library for checkbashisms
2020-10-04 18:30:54 +03:00
Philip Khor 0fc4c5c490
Update callback.R with keyword arguments (#3430)
see #3390. Also added isTRUE for some of the logical checks, please advise if this is okay
2020-10-03 18:48:57 -05:00
James Lamb 73d65c7989
[R-package] Fix incorrect num_iterations, early_stopping_round in saved models (fixes #2208, #2468) (#3368)
* params to string

* add tests

* more  tests

* stop skipping training continuation test (fixes #2468)

* remove unnecessary code
2020-09-26 21:40:39 -05:00
James Lamb e6048b647a
[R-package] add new copyright holder in DESCRIPTION (#3409)
* [R-package] add new copyright holder in DESCRIPTION

* fix role
2020-09-26 21:12:15 +03:00
James Lamb df37bcee2f
[R-package] use keyword arguments in internal function calls (#3391)
* [R-package] use keyword arguments in internal function calls

* empty commit
2020-09-25 04:23:49 +03:00
Belinda Trotta 2870490073
Average precision score (#3347)
* Implement average precision score

* Fix lint errors

* Change name to average_precision

* Add to R-package list of metrics

* Empty commit to trigger CI jobs

* Change name to average_precision
2020-09-23 16:48:49 +03:00
Nikita Titov 571cad7e55
[R-package] mark CMake option for building R package as private (#3397)
* Update install.libs.R

* Update CMakeLists.txt
2020-09-14 21:52:35 +03:00
James Lamb 3a2686db86
[R-package] ignore temp files created by R on Mac (#3388) 2020-09-13 08:08:30 +03:00
James Lamb 788f3a1a9f
[R-package] remove unnecessary comments (#3356)
* [R-package] remove unused code and comments

* put check back

* other typos
2020-09-11 09:39:51 -05:00
James Lamb d4325c5a44
[R-package] added support for first_metric_only (fixes #2368) (#2912)
* [R-package] started implementing first_metric_only

* trying stuff

* more changes

* fixed handling of multiple metrics

* fixed tests

* remove duplicate tests

* get training tests

* fixes for lgb.cv()

* fixes for lgb.cv()

* fix linting
2020-09-05 20:41:37 -05:00
David Dalpiaz aa18f844c3
[R-package] fix typo in R installation instructions (#3350)
* fix typo in R installation instructions

* move r installation instructions to correct version
2020-09-04 16:04:56 -05:00
Guolin Ke 8fc80bb487
bump version (#3344)
* Update VERSION.txt

* Update .appveyor.yml

* remove 3.0-RC installation guide

* Apply suggestions from code review

* [R-package] bump version (#3345)

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-09-02 09:44:03 +08:00
James Lamb 7e11d4aeab
[R-package] Add R logo (fixes #3331, #3332) (#3336)
* [R-package] add R package logo

* more changes

* add logo in the place CRAN expects

* revert unnecessary Rbuildignore stuff

* uploaded hex logo for R-package in SVG format (#3340)

* remove duplicate logo and fix CI

* use SVG instead of PNG

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-08-29 23:09:26 -05:00
James Lamb 5538eb8d81
[R-package] [ci] Reduce manual effort for version updates (#3335)
* [R-package] [ci] Reduce manual effort for version updates

* fix configure

* remove useless comment

* Update build_r.R

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>

* fix recreate-configure check in CI

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
2020-08-25 14:36:37 -05:00
James Lamb 8ab35255a5
[R-package] update roles in DESCRIPTION (#3333) 2020-08-23 17:05:40 +08:00
James Lamb 7d6f742d4a
[R-package] remove blank lines and not-really-comments from .Rbuildignore (#3318) 2020-08-19 10:51:54 -05:00
James Lamb 8662e36d1b
[ci] Test 32-bit builds for R package (#3311)
* [ci] Test 32-bit builds for R package

* update README

* empty commit
2020-08-17 21:50:33 -05:00
Guolin Ke e9fbd19d7c
[R] Fix 32-bit build (#3307)
* use integer type for handle

* Apply suggestions from code review

* fix 64bit handle
2020-08-15 22:45:48 +08:00
James Lamb 1804fd12ea
[R-package] DESCRIPTION changes to address CRAN feedback (#3298)
* [R-package] DESCRIPTION changes to address CRAN feedback

* CRAN likes single quotes

* the regex rules for Rbuildignore are weird

* ugh Rbuildignore

* how does this wooork

* just remove cran-comments.md in script

* adding Biarch back

* Update R-package/cran-comments.md

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* add submission 3 notes

* Update R-package/cran-comments.md

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-08-12 20:17:38 -05:00
James Lamb 2b0a09f8fe
[R-package] Add docs on building and using precompiled binaries for the R package (#3285)
* add docs on binary packages

* added docs on binary packages

* [R-package] Add documentation on building and using precompiled binaries for the R package

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* hyphens

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* add notes on source package

* add --no-multiarch to docs

* add cran-comments to Rbuildignore

* revert

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-08-12 10:29:29 -05:00
Nikita Titov 877d58fac7
simplify start_iteration param for predict in Python and some code cleanup for start_iteration (#3288)
* simplify start_iteration param for predict in Python and some code cleanup for start_iteration

* revert docs changes about the prediction result shape
2020-08-11 16:32:43 +03:00
Guolin Ke 63c8287928
v3.0.0rc1 (#3071)
* Update VERSION.txt

* Update VERSION.txt

* Update setup.py

* Update VERSION.txt

* Update setup.py

* Update VERSION.txt

* Update .appveyor.yml

* Update DESCRIPTION

* Apply suggestions from code review

* Apply suggestions from code review

* Update DESCRIPTION

* Apply suggestions from code review

* Create VERSION.txt

* Apply suggestions from code review

* Update .gitignore

* Update recreate-configure.sh

* Update test_r_package.sh

* Update build-cran-package.sh

* Delete VERSION.txt

* Create VERSION.txt

* Update main.yml

* Update test_r_package_windows.ps1

* Update configure

* Update test_r_package_windows.ps1

* Update test_r_package.sh

* Delete VERSION.txt

* Apply suggestions from code review

* update configure.ac

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-08-07 08:11:12 +08:00
shiyu1994 82e2ff7a01
[Python] / [R] add start_iteration to python predict interface (fix #3058) (#3272)
* [python] add start_iteration to python predict interface (#3058)

* Apply suggestions from code review

* Update lightgbm_R.h

* Apply suggestions from code review

* Apply suggestions from code review

* fix R interface

* update R documentation

Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
2020-08-06 20:40:33 +08:00
James Lamb 083b02af73
[R-package] refactor and improvements to lgb.convert() functions (fixes #2678, #2681) (#3269)
* [R-package] improvements to lgb.convert() functions (fixes #2678, #2681)

* more stuff

* update docs

* remove lgb.convert()

* put internal functions back

* update index
2020-08-05 22:11:46 -05:00
James Lamb c454d5f8cc
[R-package] move all examples to dontrun() to fix R CMD CHECK notes (#3270)
* Move all examples to dontrun

* update docs

* fix nested dontrun

* remove :: in examples

* run_dontrun in pkgdown

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-08-05 20:53:11 -05:00
Guolin Ke 4f28233b8f
fix multi-class objective (softmax) (#3256)
* Update multiclass_objective.hpp

* Apply suggestions from code review

* Update src/objective/multiclass_objective.hpp

* Apply suggestions from code review

* Update test_basic.R

* Update test_basic.R

* Update src/objective/multiclass_objective.hpp

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* Apply suggestions from code review

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-08-06 07:28:43 +08:00
James Lamb 66600b294d
[R-package] fix early_stopping_round <= 0 (#3259)
* [R-package] fix early_stopping_round <= 0

* linting
2020-08-01 21:47:53 -05:00
James Lamb fecac8e74a
[R-package] deprecate lgb.prepare() and lgb.prepare2() (#3095)
* [R-package] deprecate lgb.prepare() and lgb.prepare2()

* linting

* renaming

* updated docs

* linting

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* one more comment fix

* remove comment about int being dangerous

* empty commit

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-08-01 12:14:56 -05:00
James Lamb ff85e59ab8
[R-package] allow R to pick between -fPIC and -fpic for CRAN package (#3261)
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-07-29 18:07:21 +03:00
James Lamb aa933eb427
[R-package] make package installable with CRAN toolchain (fixes #2960) (#3188)
* [R-package] make package installable with CRAN toolchain (fixes #2960)

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* remove GPU stuff

* use wildcard to find objects to build

* use -lomp

* build configure before moving files

* using wildcard for objects

* Update .github/workflows/main.yml

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* add explicit objects back

* reduce allowed R CMD check NOTEs and catch stderr from build-cran-package on Windows

* fixing things

* pin autoconf version

* show diff

* add automake back

* run less checks

* command was in the wrong place

* fix autoconf version

* change strategy for handling configure

* fix Rbuildignore

* fix NOTEs

* fix notes about unrecognized files

* fixing extra files

* remove USE_R35

* add OpenMP check for Mac CRAN build

* run all checks

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* suggestions from code review

* undo indenting

* remove 03 from Makevars.win.in

* update language about OpenMP in configure script

* checking if configure.ac check works

* add autoconf back

* remove testing code in configure.ac

* more fixes for CI on configure script

* print git diff

* add VERSION.txt when checking configure

* fix relative paths

* remove git diff

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-07-28 21:05:59 -05:00
James Lamb f2589310fd
[R-package] remove duplicated test (#3250) 2020-07-24 16:23:48 +03:00
James Lamb 952e23a009
[R-package] Add tests on lgb.check.eval, lgb.unloader, and lgb.encode.char (#3235)
* [R-package] Add tests on lgb.check.eval, lgb.unloader, and lgb.encode.char

* remove accidental test file

* regenerated docs
2020-07-21 21:41:01 -05:00
James Lamb f257636d01
[ci] remove unnecessary R_CHECK_FORCE_SUGGESTS in CI scripts (#3240)
* [ci] remove unnecessary R_CHECK_FORCE_SUGGESTS in CI scripts

* remove unused test data
2020-07-20 20:12:10 +03:00
James Lamb 8e077e0d71
[R-package] add test on importance types (#3231)
* [R-package] add test on importance types

* linting
2020-07-20 20:33:07 +08:00
James Lamb 9f52282d0b
[R-package] factor out {ggplot2} (#3224)
* more changes

* factor out ggplot2

* update CI

* remove library()

* linting

* reduce NOTEs on Windows
2020-07-20 20:31:20 +08:00
Guolin Ke 87d46489f3
feature importance type in saved model file (#3220)
* feature importance type in saved model file

* fix nullptr

* fixed formatting

* fix python/R

* Update src/c_api.cpp

* Apply suggestions from code review

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* fix c_api test

* fix swig

* minor docs improvements and added defines for importance types

Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-07-15 22:18:53 +03:00
James Lamb 1c21d12eb3
removing custom R-to-C++ interface (#3223) 2020-07-12 21:16:30 -05:00
James Lamb 2792923d35
[R-package] Add version floor of R 3.5 (fixes #3212) (#3216) 2020-07-11 22:37:31 -05:00
James Lamb 7b935430d8
[R-package] remove unused Suggests dependencies (#3217) 2020-07-10 08:41:55 -05:00
Belinda Trotta 4f8c32d9a6
[R-package] Interface for interaction constraints (#3136)
* Add interaction constraints functionality.

* Minor fixes.

* Minor fixes.

* Change lambda to function.

* Fix gpu bug, remove extra blank lines.

* Fix gpu bug.

* Fix style issues.

* Try to fix segfault on MACOS.

* Fix bug.

* Fix bug.

* Fix bugs.

* Change parameter format for R.

* Fix R style issues.

* Change string formatting code.

* Change docs to say R package not supported.

* Refactor check_interaction_constraints into separate function, add validation.

* Fix error messages.

* Add tests.

* Update docs.

* Fix tests, minor refactoring.

* Fix style issues.

* Fix R style issue.

* Remove old code.

* Fix existing test and add new one.

* Fix R lint error.
2020-07-02 13:45:44 -05:00
James Lamb be85f56ffc
[R-package] fix R CMD check NOTE about leftover files (#3181)
* [R-package] fix R CMD check NOTE about leftover files

* update number of allowed notes
2020-06-23 09:01:02 -05:00
Belinda Trotta bca2da9728
Interaction constraints (#3126)
* Add interaction constraints functionality.

* Minor fixes.

* Minor fixes.

* Change lambda to function.

* Fix gpu bug, remove extra blank lines.

* Fix gpu bug.

* Fix style issues.

* Try to fix segfault on MACOS.

* Fix bug.

* Fix bug.

* Fix bugs.

* Change parameter format for R.

* Fix R style issues.

* Change string formatting code.

* Change docs to say R package not supported.

* Remove R functionality, moving to separate PR.

* Keep track of branch features in tree object.

* Only track branch features when feature interactions are enabled.

* Fix lint error.

* Update docs and simplify tests.
2020-06-23 16:39:48 +03:00
James Lamb 85b2843970
[R-package] [ci] cut nrounds in unit tests (#3169) 2020-06-23 00:25:10 +03:00
James Lamb e83042f206
[R-package] Add support for R 4.0 (fixes #3064, fixes #3024) (#3065)
* [R-package] replaced gendef.exe with R code to create R.def (fixes #3064)

* fix broken things

* trying to add R4.0 docs

* changed make

* fixing make paths

* update notes on environment variables

* fix linting

* fixes to CI

* fixing build_cmd and other stuff

* fix bad substitution

* fix Azure Linux builds

* I am bad at bash

* simplifying

* only testing R

* getting better logs

* mingw32

* docs

* toolchain

* using msys

* fix visual studio condition

* toolchain test

* full CI

* fix if-elses

* bump allowed NOTEs

* search for Rscript

* updates to docs

* use processx

* fix mismatched arguments

* move CI to GitHub Actions

* minor changes

* fix workflow file

* fix templating

* fix Azure DevOps

* debugging windows builds

* dont shQuote file name

* all GitHub Actions jobs

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* minor cleanup

* remove objdump printing

* make file.remove() invisible

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* reduce duplicated paths in docs

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-06-14 08:56:34 +08:00
Nikita Titov f30e0bb3d9
refactor LGBM_DatasetGetFeatureNames (#3022) 2020-06-11 03:05:01 +03:00
Nikita Titov ac5f5e56d0
Revert "re-order includes (fixes #3132) (#3133)" (#3153)
This reverts commit 656d2676c2.
2020-06-05 18:53:07 +03:00
James Lamb 675b552d53
[R-package] fix best_score using custom evaluation (fixes #3112) (#3117) 2020-06-04 08:57:12 -05:00
Michael Mayer 9d433033f2
[R-package] Turn matrix to storage mode "double" (#3140)
* Turn matrix to storage mode "double"

* added "test_Predictor.R" to R tests with check for integer storage mode during prediction

* Explicit integers in test_Preditor to avoid TravisCI failure

* properly aligning comment on storage.mode

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* split double assignment into two lines

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-06-03 21:49:04 -05:00
James Lamb 656d2676c2
re-order includes (fixes #3132) (#3133) 2020-06-01 22:13:32 +03:00
James Lamb 51b84df8d7
[R-package] fix issue where early stopping thinks higher MAPE is desirable (fixes #3099) (#3101)
* [R-package] fix issue where early stopping thinks higher MAPE is desirable (fixes #3099)

* fix linting

* only use main metrics

* fix tests
2020-05-24 21:24:38 -05:00
James Lamb 4d43e96bbc
[R-package] move R source files into R-package, reduce duplication in build_r.R (#3087)
* [R-package] move R source files into R-package

* fix linting warning

* stuff
2020-05-24 21:23:38 -05:00
James Lamb 5539e5aa88
[R-package] characterize all cmake messages (#3105) 2020-05-20 20:51:44 +03:00
James Lamb 58e9b1da02
[R-package] [docs] fix warnings in pkgdown site building (#3086)
* [R-package] [docs] fix warnings in pkgdown sitte  building

* trying to get better Travis logs

* trying to get better Travis logs

* undo testing fix

* undo testing fix

* empty commit
2020-05-16 16:24:14 -05:00
James Lamb 0e3509cb0b
[R-package] fix warnings in tests (#3069) 2020-05-16 14:41:52 +02:00
James Lamb 9085f4e23a
[R-package] [docs] remove devtools dependency for docs builds (fixes #3036) (#3072)
* [R-package] [docs] remove devtools dependency for docs builds

* linting

* updating docs conda env

* empty roxygenize()

* env for R libraries

* get logs

* remove comment

* added pkgdown URLs

* more paths

* fix incorrect YAML keys

* update DESCRIPTION URL link

* more URL changes

* revert DESCRIPTION changes

* remove ca-certificates

* empty commit

* Update docs/conf.py

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* empty commit

* remove outdated line in build_r.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-05-14 21:14:34 +03:00
James Lamb 3caf359a79
[R-package] speed up installation with Visual Studio (#2965)
* fix conflicts

* Update R-package/src/install.libs.R

* empty commit
2020-05-14 19:31:13 +03:00
Nikita Titov 1576819c50
[docs] document one more workaround for CMake and MinGW build and fix typos (#3081) 2020-05-14 01:46:44 +03:00
James Lamb 05d89a1a1f
[R-package] added tests on LGBM_BoosterResetTrainingData_R (#3020) 2020-05-10 22:26:52 -05:00
James Lamb 5e0958fbc6
[R-package] add conda dir for LIBR_CORE_LIBRARY (fixes #3045) (#3046)
* [R-package] add conda dir for LIBR_CORE_LIBRARY (fixes #3045)

* empty commit
2020-05-04 05:46:04 +03:00
James Lamb f77abac195
[R-package] CMake fixes to support MSVC (#2963)
* [R-package] CMake fixes to support MSVC

* simplifications

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* removed MSVC_RUNTIME_LIBRARY property

* fixed FindLibR search for LIBR_CORE_LIBRARY

* Update CMakeLists.txt

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* made R.lib linking more explicit

* add R_DOT_LIB_FILE to cache

* changed R.lib CMake name

* fix placementt tof R_MSVC_CORE_LIBRARY

* empty commit

* change MSVC library name

* one more name change

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-05-03 02:08:18 +03:00
Laurae 62a00eb292
Remove lgbdl from docs until future fix (#3035) 2020-04-29 22:27:36 -05:00
James Lamb 2c18a0f3ed
[R-package] [ci] Add Windows CI for R package (fixes #2335) (#2936)
* first test of appveyor

* strings are strings

* lil bit of build script

* fixing paths

* removed unnecessary file

* updated CRAN URL

* added a lot more printing

* fixing paths

* more stuff

* fixed paths

* more stuff

* more path guessing

* even more paths

* more stuff

* moar logz

* and now for something totally different

* please work

* ok could be a thing

* changing directories

* we might be in business

* fixed install syntax

* tryinv mingw

* more mingw

* ignore Suggests check

* trying Azure DevOps

* just run bare minimum for Azure DevOps

* fixed  build dir thing

* trying to set libPaths

* more testing

* trying R 3.6.3

* R 3.6.3

* this feels right

* still messing around with libraries

* more paths

* removed duplication in Windows testing code

* simpler

* fixed conda stuff

* more conda stuff

* more fixes

* fixed testing script

* moved AppVeyor setup to the top

* commenting

* ch-ch-ch-ch-chaaaanges

* paths

* plz work

* fixed conda stuff in Windows CI

* uncommented stuff to test a full build

* fixed quotes and removed some unnecessary stuff

* added install.libs.R change

* quotes are impoortant

* added commented-out stuff back in

* added Windows script, download retries, and MSVC linking

* minor fixes

* cleaned up debugging code in FindLibR

* cleaned up debugging code and moved R first in CI

* fixed vsts-ci indentation

* cut documentation stuff out of MSVC build

* fix R CMD check for Azure

* misc whitespace changes

* Added echoing of build logs from R CMD check

* cut out more documentation tests

* fixed NOTE about imports from Matrix

* moved some changes out of this PR and into #2963

* fixed whitespace stuff

* added check on number of NOTES

* adding better checks

* fixing check on NOTEs

* removing unnecessary variable

* Update .ci/test_r_package_windows.ps1

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* some changes

* fix quoting

* trying MINGW on Azure DevOps

* fixing paths

* more paths

* fixing paths

* testing paths

* fixing slashes

* pinned CTAN mirror

* get better logs

* made sure Azure finds MinGW, fixed search for LIBR_CORE_LIBRARY, stopped building R docs on Azure

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* added CXX, CC for Windows builds and changed back to building docs on all MINGW builds

* stored LIBR_CORE_LIBRARY hints in one variable

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* changes from code review

* increased parallel builds for Azure CI

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-04-26 16:05:45 -05:00
James Lamb 1f3e72c43c
[R-package] fixed best_iter and best_score when training data is passed (fixes #2295, #2525) (#2961)
* [R-package] fixed best_iter and best_score when early_stopping is not used (fixes #2295)

* fixed tests
2020-04-25 11:35:54 -05:00
James Lamb 2b9175aae4
[R-package] added tests on LGBM_BoosterRollbackOneIter_R (#3006) 2020-04-25 00:42:54 -05:00
James Lamb b05520e7ec
[R-package] [docs] remove unnecessary build in test coverage (#3004) 2020-04-25 00:17:17 -05:00
James Lamb 5304885c0a
[R-package] Added tests on LGBM_GetLastError_R (#3005) 2020-04-24 23:47:51 -05:00
James Lamb 22d6d1fd5a
[R-package] Added tests on creating a Booster from a Dataset (#3007) 2020-04-24 23:45:45 -05:00
James Lamb 9478e52f9f
[R-package] fix R examples and lgb.plot.interpretation() (#3002)
* [R-package] fix R examples and lgb.plot.interpretation

* remove space in gitignore

* try data.table from conda-forge

* update FAQ

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-04-21 13:47:23 -05:00
James Lamb 7d5bfdaf2b
[R-package] Updated package metadata in DESCRIPTION (#2993) 2020-04-14 22:39:27 -05:00
James Lamb 181616748b
[R-package] [docs] Simplified examples to cut example run time (fixes #2988) (#2989)
* [R-package] [docs] Simplified examles to cut example run time (fixes #2988)

* updated learning rates
2020-04-15 03:17:56 +03:00
OMOTO Tsukasa 44a9120197
Support UTF-8 characters in feature name again (#2976)
* Support UTF-8 characters in feature name again

This commit reverts 0d59859c67.
Also see:
- https://github.com/microsoft/LightGBM/issues/2226
- https://github.com/microsoft/LightGBM/issues/2478
- https://github.com/microsoft/LightGBM/pull/2229

I reproduced the issue and as @kidotaka gave us a great survey in #2226,
I don't conclude that the cause is UTF-8, but "an empty string (character)".
Therefore, I revert "throw error when meet non ascii (#2229)" whose commit hash
is 0d59859c67, and add support feture names as UTF-8 again.

* add tests

* fix check-docs tests

* update

* fix tests

* update .travis.yml

* fix tests

* update test_r_package.sh

* update test_r_package.sh

* update test_r_package.sh

* add a test for R-package

* update test_r_package.sh

* update test_r_package.sh

* update test_r_package.sh

* fix test for R-package

* update test_r_package.sh

* update test_r_package.sh

* update test_r_package.sh

* update test_r_package.sh

* update

* updte

* update

* remove unneeded comments
2020-04-10 12:54:01 +09:00
James Lamb 91ce04b687
[R-package] Added unit tests on creating Booster from file or string (#2945) 2020-04-08 14:40:26 -05:00
James Lamb 84bdf25798
[R-package] adding routine registration in R package (fixes #1910) (#2911) 2020-04-01 11:18:52 -05:00
James Lamb 0341906c45
[R-package] Use Rprintf for logging in the R package (fixes #1440, fixes #1909) (#2901)
* [R-package] started cutting over from custom R-to-C interface to R.h

* replaced LGBM_SE with SEXP

* fixed error about ocnflicting definitions of length

* got linking working

* more stuff

* eliminated R CMD CHECK note about printing

* switched from hard-coded include dir to the one from FindLibR.cmake

* cleaned up formatting in FindLibR.cmake

* commented-out everything in CI that does not touch R

* more changes

* trying to get better logs

* tried ignoring

* added error message to confirm a suspicion

* still trying to find R during R CMD CHECK

* restore full CI

* fixed comment

* Update R-package/src/cmake/modules/FindLibR.cmake

* changed strategy for finding LIBR_HOME on Windows

* Removed 32-bit Windows stuff in FindLibR.cmake

* Update R-package/src/cmake/modules/FindLibR.cmake

* Update CMakeLists.txt

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update CMakeLists.txt

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* removed some duplication in cmake scripts

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* added LIBR_CORE_LIBRARY back

* small fixes to CMakeLists

* simplified FindLibR.cmake

* some fixes for windows

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* allowed for directly passing LIBR_EXECUTABLE to FindLibR.cmake

* reorganized FindLibR.cmake to catch more cases

* clean up inconsistencies  in R calls in FindLibR.cmake

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* removed unnecessary log messages

* removed unnecessary unset() call

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-03-24 03:11:30 +03:00
James Lamb 7f71c96c0e
[R-package] fixed some minor issues with testing on Windows (#2908) 2020-03-22 10:42:23 -05:00
James Lamb c6245ed422
[R-package] fixed evaluation on valids in lightgbm() (fixes #2915) (#2916) 2020-03-21 20:51:39 -05:00
James Lamb 8d43356a6d
[R-package] fixed handling of multiple evaluation metrics (fixes #2913) (#2914) 2020-03-21 16:51:01 +03:00
James Lamb 651375d5a6
[R-package] added test on uncovered line of lgb.plot.importance() (#2903) 2020-03-21 16:39:10 +03:00
James Lamb 9654f16528
[R-package] fixed NOTE about unrecognized global variable (#2928) 2020-03-20 13:43:01 -05:00
James Lamb d42f43132d
[R-package] [ci] added more linters (#2803)
* [R-package] [ci] added more linters

* Update R-package/tests/testthat/test_parameters.R

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* added cbind() to undesirable_function_linter

* fixed linting

* Update .ci/lint_r_code.R

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-03-17 23:33:29 +03:00
James Lamb 0d878b17fe
[R-package] removed duplicated code figuring out build_dir in install.libs.R (#2917) 2020-03-16 14:08:30 +03:00
James Lamb a78e3ed006
[R-package] added command to remove build/ dir in install.libs.R (#2909) 2020-03-15 18:00:14 -05:00
James Lamb 4ec2b9ac22
[R-package] removed unnecessary flag in tests (#2910) 2020-03-14 11:29:11 -05:00
James Lamb 17b8ce16cf
[R-package] Introduce R-specific control of lib_lightgbm (#2837)
* [R-package] Introduced define LGB_BUILD_R to control compilation of lib_lightgbm for the R package

* fixed comment

* switched to cmake options

* fixed typo
2020-03-09 22:56:39 -05:00
Nikita Titov c319474fd8
[R-package] [docs] Added documentation on lgb.dl() and data.table version (fixes #2715) (#2846)
* [R-package] [docs] Added documentation on lgb.dl() and data.table version

* added missed table of contents item

* moved known issues to FAQ docs

* fixed formatting
2020-03-04 20:52:43 +03:00
Nikita Titov d018d30a97
fixed cpplint issues (#2863)
* fixed cpplint errors

* fixed more cpplint errors
2020-03-04 19:02:54 +08:00
James Lamb 2215d57114
[R-package] [ci] Added R tests on early_stopping (#2848) 2020-03-03 17:13:49 -06:00
James Lamb f7037fd596
[R-package] added test on training with sparse features (#2847) 2020-03-02 09:36:50 -06:00
Guolin Ke e676af2366
Code refactoring for ranking objective & Faster ndcg_xendcg (#2801)
* code refactoring

* update vcproject

* refine

* fix test

* Update tests/python_package_test/test_sklearn.py

* fix test
2020-02-26 13:04:56 +08:00
James Lamb 790c1e33e6
[R-package] Fixed R implementation of upper_bound() and lower_bound() for lgb.Booster (#2785)
* [R-package] Fixed R implementation of upper_bound() and lower_bound() for lgb.Booster

* [R-package] switched return type to double

* fixed  R tests on Booster upper_bound() and lower_bound()

* fixed linting

* moved numeric tolerance into a global constant
2020-02-22 21:57:55 -06:00
Nikita Titov 997a469f78
fixed metric_freq param description (#2780) 2020-02-20 13:52:48 +08:00
Joan Fontanals 18e7de4f5d
Add capability to get possible max and min values for a model (#2737)
* Add capability to get possible max and min values for a model

* Change implementation to have return value in tree.cpp, change naming to upper and lower bound, move implementation to gdbt.cpp

* Update include/LightGBM/c_api.h

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Change iteration to avoid potential overflow, add bindings to R and Python and a basic test

* Adjust test values

* Consider const correctness and multithreading protection

* Update test values

* Update test values

* Add test to check that model is exactly the same in all platforms

* Try to parse the model to get the expected values

* Try to parse the model to get the expected values

* Fix implementation, num_leaves can be lower than the leaf_value_ size

* Do not check for num_leaves to be smaller than actual size and get back to test with hardcoded value

* Change test order

* Add gpu_use_dp option in test

* Remove helper test method

* Update src/c_api.cpp

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update src/io/tree.cpp

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update src/io/tree.cpp

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update tests/python_package_test/test_basic.py

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Remoove imports

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-02-20 09:42:36 +08:00
Nikita Titov 25d149d8ce
[R-package] fixed R Dataset aliases (#2775)
* fixed R Dataset aliases

* Update R-package/R/aliases.R

Co-Authored-By: James Lamb <jaylamb20@gmail.com>

* fix one more typo

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-02-19 16:15:48 +03:00
Guolin Ke 9f79e8402c
[python] [R-package] refine the parameters for Dataset (#2594)
* reset

* fix a bug

* fix test

* Update c_api.h

* support to no filter features by min_data

* add warning in reset config

* refine warnings for override dataset's parameter

* some cleans

* clean code

* clean code

* refine C API function doxygen comments

* refined new param description

* refined doxygen comments for R API function

* removed stuff related to int8

* break long line in warning message

* removed tests which results cannot be validated anymore

* added test for warnings about unchangeable params

* write parameter from dataset to booster

* consider free_raw_data.

* fix params

* fix bug

* implementing R

* fix typo

* filter params in R

* fix R

* not min_data

* refined tests

* fixed linting

* refine

* pilint

* add docstring

* fix docstring

* R lint

* updated description for C API function

* use param aliases in Python

* fixed typo

* fixed typo

* added more params to test

* removed debug print

* fix dataset construct place

* fix merge bug

* Update feature_histogram.hpp

* add is_sparse back

* remove unused parameters

* fix lint

* add data random seed

* update

* [R-package] centrallized Dataset parameter aliases and added tests on Dataset parameter updating (#2767)

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-02-19 09:20:03 +08:00
Nikita Titov 1c1a276519 various minor style, docs and cpplint improvements (#2747)
* various minor style, docs and cpplint improvements

* fixed typo in warning

* fix recently added cpplint errors

* move note for params upper in description for consistency
2020-02-09 02:15:24 +03:00
Nikita Titov d92d844447
[python][R-package][docs] fix support of XE_NDCG_MART obj in language wrappers and docs (#2726) 2020-02-03 13:19:17 +08:00
Nikita Titov bef83598b9
[python][R-package] removed duplicated code from language wrappers (#2606)
* removed duplicated code from language wrappers

* removed check for resetting metric
2020-02-03 05:57:05 +03:00
Guolin Ke 509c2e50c2
Support both row-wise and col-wise multi-threading (#2699)
* commit

* fix a bug

* fix bug

* reset to track changes

* refine the auto choose logic

* sort the time stats output

* fix include

* change  multi_val_bin_sparse_threshold

* add cmake

* add _mm_malloc and _mm_free for cross platform

* fix cmake bug

* timer for split

* try to fix cmake

* fix tests

* refactor DataPartition::Split

* fix test

* typo

* formating

* Revert "formating"

This reverts commit 5b8de4f7fb.

* add document

* [R-package] Added tests on use of force_col_wise and force_row_wise in training (#2719)

* naming

* fix gpu code

* Update include/LightGBM/bin.h

Co-Authored-By: James Lamb <jaylamb20@gmail.com>

* Update src/treelearner/ocl/histogram16.cl

* test: swap compilers for CI

* fix omp

* not avx2

* no aligned for feature histogram

* Revert "refactor DataPartition::Split"

This reverts commit 256e6d9641.

* slightly refactor data partition

* reduce the memory cost

Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-02-02 12:42:17 +08:00
James Lamb d90642820d
[R-package] moved parameter validations up earlier in function calls (#2663) 2020-01-25 09:00:55 -06:00
James Lamb 08fd53cd13 [R-package] clarified error messages and documentation for lgb.get.eval.result() (#2686)
* [R-package] clarified error messages and documentation for lgb.get.eval.result()

* fixed bad link

* Update R-package/man/lgb.get.eval.result.Rd

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* [R-package] added fixes from codereview back in

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-01-24 22:09:14 +03:00
James Lamb 710f1ae627 [R-package] added test that Dataset$setinfo() converts 'group' input to integer (#2687) 2020-01-24 21:29:53 +03:00
James Lamb 8a4c5494b0 [R-package] added tests on lgb.plot.importance and clarified documentation (#2692) 2020-01-24 21:05:16 +03:00
James Lamb f2afb2cd35 [R-package][docs] made roxygen2 tags explicit and cleaned up documentation (#2688)
* [R-package] made roxygen2 tags explicit and cleaned up documentation

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/man/lightgbm.Rd

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* [R-package] moved @name to the top of roxygen blocks and removed some inaccurate information in documentation on parameters

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-01-20 22:35:49 +03:00
James Lamb dd16fa99fc
[R-package] fixed sorting issues in lgb.cv() when using a model with observation weights (fixes #2572) (#2573) 2020-01-15 22:19:42 -06:00
Guolin Ke 82886ba644
[python] [R-package] Use the same address when updated label/weight/query (#2662)
* Update metadata.cpp

* add version for training set, for efficiently update label/weight/... during training.

* Update lgb.Booster.R
2020-01-14 18:44:57 +08:00
James Lamb f449a78df3
[R-package] Added instructions for generating R test coverage (#2664) 2020-01-12 16:59:46 -06:00
James Lamb 2048b1393f
[R-package] added tests on lgb.prepare function (#2685) 2020-01-12 16:26:26 -06:00
Nikita Titov 8944b5e6b9
removed OpenMP ugly fix for Mojave (#2674)
* removed OpenMP ugly fix for Mojave as it's fixed in latest CMake

* test: switch compilers

* switch compilers back
2020-01-12 16:51:27 +03:00
James Lamb 65455588c8 [R-package] [docs] Added reference to unofficial R extensions (fixes #2640) (#2670) 2020-01-06 19:07:16 +03:00
James Lamb d0bd8270ed [R-package] [ci] removed TODOs in code (#2667)
* [R-package] removed TODOs in code

* [ci] added to-do to TODO comment linter
2020-01-06 18:11:28 +03:00
James Lamb 4eb0745d9a
[R-package] simplified lgb.check.eval() (#2654) 2020-01-01 17:47:51 -06:00
James Lamb 4075e4958c
[R-package] removed function lgb.check.params (#2652) 2020-01-01 17:47:24 -06:00
James Lamb 427a0e20ae [R-package] fixed typo for variable valid_contain_train (#2653) 2019-12-29 15:06:47 +03:00
Guolin Ke 7b411bddec
warning for init_score in save_binary (#2649)
* warning for init_score in save_binary

fix #2639

* Update metadata.cpp

* added info into docs

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2019-12-29 13:01:02 +08:00
James Lamb 86ca484508
[R-package][ci] added CI stage for R package (fixes #2335, fixes #2569) (#2530) 2019-12-15 12:01:01 -06:00
Belinda Trotta 222775ca29 auc-mu metric (#2567)
* Fix bug where small values of max_bin cause crash.

* Revert "Fix bug where small values of max_bin cause crash."

This reverts commit fe5c8e2547.

* Add auc-mu multiclass metric.

* Fix bug where scores are equal.

* Merge.

* Change name to auc_mu everywhere (instead of auc-mu).

* Fix comparison between signed and unsigned int.

* Change name to AUC-mu in docs and output messages.

* Improve test.

* Use prefix increment.

* Update R package.

* Fix style issues.

* Tidy up test code.

* Read all lines first then process.

* Allow passing AUC-mu weights directly as a list in parameters.

* Remove unused code, improve example and docs.
2019-12-12 23:27:27 +03:00
Nikita Titov 69c1c33093
[python][R-package] warn users about untransformed values in case of custom obj (#2611) 2019-12-05 16:53:13 +03:00
Nikita Titov 483a9bbad2
bump version for development (#2599) 2019-11-29 03:40:04 +03:00
Nikita Titov 8364fc3e9a
Release 2.3.1 (#2596) 2019-11-28 16:20:18 +03:00
James Lamb 102893a11c
[R-package] fixed minor issues with tests and documentation (#2581) 2019-11-25 08:11:44 -06:00
James Lamb a6ba859ed5
[R-package] fixed parameter-name typo in lgb.cv() (#2576) 2019-11-18 21:33:46 -08:00
James Lamb 1f7b06b983 [R-package][ci] Added more R linters (fixes #2477) (#2533)
* Added more linters on R code

* started working on implicit integers

* finished style changes to handle implicit integers

* regenned documentation and added concatenation linter

* changed channel for r-lintr

* try building stringi before lintr

* trying to get libicui18n

* trying another thing

* trying conda-forge again

* added re-install of stringi

* uncommented other stages

* Update .ci/test.sh

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* removed apt update and changed lintr version floor

* get lintr from CRAN

* R needs to come before C++ linting

* testing lintr install from CRAN

* trying one more thing

* more verbose

* order might matter

* removed commented code

* cleaned up linting block in test.sh

* grouped conda install calls and fixed a few integer array things
2019-11-17 00:12:38 +03:00
James Lamb a94275120f [R-package] removed unnecessary Suggests dependencies (#2543) 2019-11-11 17:33:34 +03:00
James Lamb 85be04a62a
[R-package] Disabled early stopping when using 'dart' boosting strategy (#2443) 2019-10-25 09:12:47 -07:00
James Lamb fc991c9d7e
[R-package] added R linting and changed R code to comma-first (fixes #2373) (#2437) 2019-10-24 13:47:26 -07:00
James Lamb b4bb38d926
[R-package] Added unit tests (#2498) 2019-10-23 19:25:03 -07:00
James Lamb bdc310a8a4
[R-package] Sort indices in lgb.cv() (fixes #2503) #2524 2019-10-23 18:48:23 -07:00
James Lamb d7f8aa53b8 [docs] fixed miscellaneous typos in comments and documentation (#2496)
* fixed miscellaneous typos in documentation

* fix typo introduced in typo-fixing PR
2019-10-07 14:46:42 +03:00
Guolin Ke 3d407b67e5
new version number after release (#2469)
* new version number after release

* Update .appveyor.yml

* Update DESCRIPTION
2019-09-29 17:53:40 +08:00
James Lamb 42204c43da
[R-package] factored dependency 'magrittr' out of R package (#2334) 2019-09-28 23:05:12 -05:00
Guolin Ke b3c126629e
v2.3.0 realese (#2138)
* Update DESCRIPTION

* bump minor version
2019-09-29 11:56:42 +08:00
Nikita Titov fe9f292cb3 added new early_stopping param alias (#2431) 2019-09-26 12:07:59 +08:00