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

156 Коммитов

Автор SHA1 Сообщение Дата
Nikita Titov 67b4205c80
[docs] document that `pred_early_stop` can be used only in normal and raw scores prediction (#4823) 2021-11-28 20:06:39 -06:00
chjinche b0137debe6
Add customized parser support (#4782)
* add customized parser support

* fix typo of parser_config_file description

* make delimiter as parameter of JoinedLines
2021-11-16 14:27:23 +08:00
Michael Mahoney 3b6ebd794b
Add 'nrounds' as an alias for 'num_iterations' (fixes #4743) (#4746)
* Add 'nrounds' as an alias for 'num_iterations'

* Improve tests

* Compare against nrounds directly

* Fix whitespace lints
2021-11-11 12:12:17 +08:00
Nikita Titov dac0dffeb2
[docs] improve docs about `nthreads` parameter (#4756)
* in predict(), respect params set via `set_params()` after fit()

* extract docs changes
2021-10-31 02:31:48 +03:00
Zhiyuan He dc02dcaf02
Fix some paramater hints when loading from binary file (#4701)
Co-authored-by: hzy46 <email@example.com>
2021-10-25 09:48:02 +08:00
Nikita Titov e95d5ab849
add param aliases from scikit-learn (#4637) 2021-10-05 10:45:29 +08:00
James Lamb fdc582ea6b
[docs] document CLI behavior when label_column is omitted (#4485) 2021-07-24 23:05:48 -05:00
Nikita Titov 0d1d12fb46
[docs] clarify description of prediction early stopping (#4411) 2021-07-09 17:22:09 +03:00
Nikita Titov aab8fc18a2
fix param aliases (#4387) 2021-06-26 15:07:37 +03:00
James Lamb 24ac920879
[docs] document how to pass multi-value params from Python and R (fixes #4345) (#4346)
* [R-package] add docs and tests on monotone constraints (fixes #4345)

* remove tests

* move doc to top level

* slightly more specific

* Update docs/Parameters.rst

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

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-06-09 20:07:50 +03:00
Chen Yufei f83180883a
Precise text file parsing (#4081)
* New build option: USE_PRECISE_TEXT_PARSER.

Use fast_double_parser for text file parsing. For each number, fallback
to strtod in case of parse failure.

* Add benchmark for CSVParser with Atof and AtofPrecise.

* Fix lint complaint.

* Fix typo in open result error message.

* Revert "Fix lint complaint."

This reverts commit 92ab0b6bce9f17d7be9eaeb20f19d4a0a36f0387.

* Revert "Add benchmark for CSVParser with Atof and AtofPrecise."

This reverts commit 4f8639abd06c679d4382eb715a1793afd94df3d2.

* Use AtofPrecise in Common::__StringToTHelper.

* [option] precise_float_parser: precise float number parsing for text input.

* Remove USE_PRECISE_TEXT_PARSER compile option.

* test: add test for Common::AtofPrecise.

* test: remove ChunkedArrayTest with 0 length.

This triggers Log::Fatal which aborts the test program.

* fix lint, add copyright.

* Revert "test: remove ChunkedArrayTest with 0 length."

This reverts commit 346c76affe9e78b6ca2738c4a56dbb9c00f31102.

* Use LightGBM::Common::Sign

* save precise_float_parser in model file.

* Fix error checking in AtofPrecise. Add more test cases.

* Remove test case that can't pass under macOS.

* 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-07 11:00:48 +08:00
Nikita Titov 8b477ba393
added aliases to params (#4205) 2021-04-23 14:51:38 +03:00
Nikita Titov 9cab93a9f3
[docs] add missed CUDA device type in docs (#4130) 2021-03-28 22:22:44 +03:00
shiyu1994 19f357726c
[docs] update description of deterministic parameter (#4027)
* update description of deterministic parameter to require using with force_row_wise or force_col_wise

* Update include/LightGBM/config.h

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

* update docs

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-03-04 15:33:54 +03:00
James Lamb 1f73f55938
[dask] allow tight control over ports (#3994)
* [dask] allow tight control over ports

* getting there, getting there

* fix params maybe

* fixing params

* remove unnecessary stuff

* fix tests

* fixes

* some minor changes

* fix flaky test

* linting

* more linting

* clarify parameter description

* add warning

* revert docs change

* Update python-package/lightgbm/dask.py

* Apply suggestions from code review

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

* trying to fix stuff

* this is working

* update tests

* Apply suggestions from code review

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

* indent

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-02-23 23:48:53 +03:00
Belinda Trotta b09c1ff70d
[DOCS] Update docs to note that pred_contrib is not available for linear trees (#4006)
* Update docs to note that pred_contrib is not available for linear trees

* Add warning in code

* Change warning to error
2021-02-23 17:52:13 +03:00
James Lamb 7880b79fde
[docs] Change some 'parallel learning' references to 'distributed learning' (#4000)
* [docs] Change some 'parallel learning' references to 'distributed learning'

* found a few more

* one more reference
2021-02-19 09:47:30 -06:00
Belinda Trotta 50e061f396
[docs] Update docs about linear tree and monotone constraints (#3945)
* Update docs about linear tree and monotone constraints

* Fix punctuation
2021-02-13 20:48:26 +03:00
Chen Yufei 111d0c8037
Add new task type: "save_binary" (#3651)
* Add new task type: "save_binary".

* Document for task "save_binary".
2021-02-03 16:58:11 +03:00
Nikita Titov 8040ef94bb
[docs] document CUDA version support (#3428)
* document CUDA version support

* address review comments

* collapse CUDA section in the guide

* remove Clang support from CUDA docs as we have never tested it
2021-01-31 17:08:06 +03:00
Nikita Titov 8ef874bd48
fix docs for machine_list_filename param (#3863) 2021-01-27 22:20:13 -06:00
Nikita Titov 787780851f
[docs] fix current RTD failures (#3787)
* fix docs

* Update basic.py

* Update engine.py
2021-01-19 17:26:45 +03: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
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
James Lamb 68a40c790b
[docs] add doc on min_data_in_leaf approximation (fixes #3634) (#3690)
* [docs] add doc on min_data_in_leaf approximation (fixes #3634)

* Fix capital letter

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-12-29 03:25:39 +03:00
Nikita Titov 5a4608467d
small code and docs refactoring (#3681)
* small code and docs refactoring

* Update CMakeLists.txt

* Update .vsts-ci.yml

* Update test.sh

* continue

* continue

* revert stable sort for all-unique values
2020-12-29 01:24:38 +03: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
James Lamb b69364e928
[docs] Add details on improving training speed (#3628)
* [docs] Add details to docs on improving training speed

* formatting

* fix link

* fix formatting

* replace 'performance' with 'accuracy' and mention learning_rate

* Apply suggestions from code review

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

* regenerate docs from config.h

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-12-11 22:16:16 +03:00
Guolin Ke bee732af78
better document for bin_construct_sample_cnt (#3521)
* better document for bin_construct_sample_cnt

* add warnings

Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
2020-11-06 09:58:02 -06:00
Guolin Ke c39afb9d5f
Support deterministic (#3494)
* implement

* fix compilation

* Update config.cpp

* unify wordings

Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
2020-11-01 14:31:34 +08:00
Nikita Titov 5cc9e67197
fix param docs (#3495) 2020-10-28 09:33:11 +08: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
CharlesAuguste 432c821469
[docs] Change doc link to monotone constraints report to HAL document (#3410) 2020-09-29 15:34:28 +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
CharlesAuguste 4278f22293
Pr4 advanced method monotone constraints (#3264)
* No need to pass the tree to all fuctions related to monotone constraints because the pointer is shared.

* Fix OppositeChildShouldBeUpdated numerical split optimisation.

* No need to use constraints when computing the output of the root.

* Refactor existing constraints.

* Add advanced constraints method.

* Update tests.

* Add override.

* linting.

* Add override.

* Simplify condition in LeftRightContainsRelevantInformation.

* Add virtual destructor to FeatureConstraint.

* Remove redundant blank line.

* linting of else.

* Indentation.

* Lint else.

* Replaced non-const reference by pointers.

* Forgotten reference.

* Leverage USE_MC for efficiency.

* Make constraints const again in feature_histogram.hpp.

* Update docs.

* Add "advanced" to the monotone constraints options.

* Update monotone constraints restrictions.

* Fix loop iterator.

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

* Fix loop iterator.

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

* Remove superfluous parenthesis.

* Fix loop iterator.

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

* Fix loop iterator.

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

* Fix loop iterator.

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

* Fix loop iterator.

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

* Fix loop iterator.

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

* Fix loop iterator.

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

* Fix loop iterator.

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

* Fix loop iterator.

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

* Remove std namespace qualifier.

* Fix unsigned_int size_t comparison.

* Set num_features as int for consistency with the rest of the codebase.

* Make sure constraints exist before recomputing them.

* Initialize previous constraints in UpdateConstraints.

* Update monotone constraints restrictions.

* Refactor UpdateConstraints loop.

* Update src/io/config.cpp

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

* Delete white spaces.

Co-authored-by: Charles Auguste <charles.auguste@sig.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-09-22 00:50:43 +03:00
Chip Kerchner f7ad945717
[GPU] Add support for CUDA-based GPU build (#3160)
* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* redirect log to python console (#3090)

* redir log to python console

* fix pylint

* Apply suggestions from code review

* Update basic.py

* Apply suggestions from code review

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

* Update c_api.h

* Apply suggestions from code review

* Apply suggestions from code review

* super-minor: better wording

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>

* re-order includes (fixes #3132) (#3133)

* Revert "re-order includes (fixes #3132) (#3133)" (#3153)

This reverts commit 656d2676c2.

* Missing change from previous rebase

* Minor cleanup and removal of development scripts.

* Only set gpu_use_dp on by default for CUDA. Other minor change.

* Fix python lint indentation problem.

* More python lint issues.

* Big lint cleanup - more to come.

* Another large lint cleanup - more to come.

* Even more lint cleanup.

* Minor cleanup so less differences in code.

* Revert is_use_subset changes

* Another rebase from master to fix recent conflicts.

* More lint.

* Simple code cleanup - add & remove blank lines, revert unneccessary format changes, remove added dead code.

* Removed parameters added for CUDA and various bug fix.

* Yet more lint and unneccessary changes.

* Revert another change.

* Removal of unneccessary code.

* temporary appveyor.yml for building and testing

* Remove return value in ReSize

* Removal of unused variables.

* Code cleanup from reviewers suggestions.

* Removal of FIXME comments and unused defines.

* More reviewers comments cleanup.

* More reviewers comments cleanup.

* More reviewers comments cleanup.

* Fix config variables.

* Attempt to fix check-docs failure

* Update Paramster.rst for num_gpu

* Removing test appveyor.yml

* Add ƒCUDA_RESOLVE_DEVICE_SYMBOLS to libraries to fix linking issue.

* Fixed handling of data elements less than 2K.

* More reviewers comments cleanup.

* Removal of TODO and fix printing of int64_t

* Add cuda change for CI testing and remove cuda from device_type in python.

* Missed one change form previous check-in

* Removal AdditionConfig and fix settings.

* Limit number of GPUs to one for now in CUDA.

* Update Parameters.rst for previous check-in

* Whitespace removal.

* Cleanup unused code.

* Changed uint/ushort/ulong to unsigned int/short/long to help Windows based CUDA compiler work.

* Lint change from previous check-in.

* Changes based on reviewers comments.

* More reviewer comment changes.

* Adding warning for is_sparse. Revert tmp_subset code. Only return FeatureGroupData if not is_multi_val_

* Fix so that CUDA code will compile even if you enable the SCORE_T_USE_DOUBLE define.

* Reviewer comment cleanup.

* Replace warning with Log message. Removal of some of the USE_CUDA. Fix typo and removal of pragma once.

* Remove PRINT debug for CUDA code.

* Allow to use of multiple GPUs for CUDA.

* More multi-GPUs enablement for CUDA.

* More code cleanup based on reviews comments.

* Update docs with latest config changes.

Co-authored-by: Gordon Fossum <fossum@us.ibm.com>
Co-authored-by: ChipKerchner <ckerchne@linux.vnet.ibm.com>
Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-09-20 13:35:01 +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
Nikita Titov b299de3f72
improve params docs (#3252) 2020-07-27 10:24:59 +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
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
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
Belinda Trotta e50a9151ed
Path smoothing (#2950)
* Path smoothing

* Try to fix issue with gpu version.

* Fix failing CI for R package.

* Minor fixes.

* Minor refactor.

* Restore old code to get CI working.

* Fix style issues.

* Fix ci for R package.

* Minor fixes for docs and code style.

* Update docs.
2020-05-03 13:53:15 +08:00
CharlesAuguste 505a145f8b
Pr3 monotone constraints splits penalization (#2939)
* Add the monotone penalty parameter to the config.

* Pass tree in the necessary functions so it can be used in ComputeBestSplitForFeature.

* Add monotone penalty.

* Added link to the original report.

* Add tests.

* Fix GPU.

* Revert "Pass tree in the necessary functions so it can be used in ComputeBestSplitForFeature."

This reverts commit 37757e8e8f3a2c82a604f4af9a926da616660d2e.

* Revert "Fix GPU."

This reverts commit e49eeee41c883f3c97fd5cdbd53c9288094bffb6.

* Added a shared pointer to the tree so the constraints can use it too.

* Moved check on monotone penalty to config.cpp.

* Python linting.

* Use AssertTrue instead of assert_.

* Fix penalization in test.

* Make GPU deterministic in tests.

* Rename tree to tree_ in monotone constraints.

* Replaced epsilon by kEplison.

* Typo.

* Make tree pointer const.

* Update src/treelearner/monotone_constraints.hpp

Co-Authored-By: Guolin Ke <guolin.ke@outlook.com>

* Update src/treelearner/monotone_constraints.hpp

Co-Authored-By: Guolin Ke <guolin.ke@outlook.com>

* Added alias for the penalty.

* Remove useless comment.

* Save CI time.

* Refactor test_monotone_penalty_max.

* Update include/LightGBM/config.h

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

* Fix doc to be in line with previous config change commit.

Co-authored-by: Charles Auguste <auguste@dubquantdev801.ire.susq.com>
Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-04-09 16:25:17 +03:00
CharlesAuguste a8c1e0a11a
Improving monotone constraints ("Fast" method; linked to #2305, #2717) (#2770)
* Add util functions.

* Added monotone_constraints_method as a parameter.

* Add the intermediate constraining method.

* Updated tests.

* Minor fixes.

* Typo.

* Linting.

* Ran the parameter generator for the doc.

* Removed usage of the FeatureMonotone function.

* more fixes

* Fix.

* Remove duplicated code.

* Add debug checks.

* Typo.

* Bug fix.

* Disable the use of intermediate monotone constraints and feature sampling at the same time.

* Added an alias for monotone constraining method.

* Use the right variable to get the number of threads.

* Fix DEBUG checks.

* Add back check to determine if histogram is splittable.

* Added forgotten override keywords.

* Perform monotone constraint update only when necessary.

* Small refactor of FastLeafConstraints.

* Post rebase commit.

* Small refactor.

* Typo.

* Added comment and slightly improved logic of monotone constraints.

* Forgot a const.

* Vectors that are to be modified need to be pointers.

* Rename FastLeafConstraints to IntermediateLeafConstraints to match documentation.

* Remove overload of GoUpToFindLeavesToUpdate.

* Stop memory leaking.

* Fix cpplint issues.

* Fix checks.

* Fix more cpplint issues.

* Refactor config monotone constraints method.

* Typos.

* Remove useless empty lines.

* Add new line to separate includes.

* Replace unsigned ind by size_t.

* Reduce number of trials in tests to decrease CI time.

* Specify monotone constraints better in tests.

* Removed outer loop in test of monotone constraints.

* Added categorical features to the monotone constraints tests.

* Add blank line.

* Regenerate parameters automatically.

* Speed up ShouldKeepGoingLeftRight.

Co-authored-by: Charles Auguste <auguste@dubquantdev801.ire.susq.com>
Co-authored-by: guolinke <guolin.ke@outlook.com>
2020-03-23 19:15:46 +03:00
Guolin Ke 0aa7bfee65
don't save num_thread as possible (#2839)
* don't cache `num_thread`, to avoid change outside

* rename

* update document

* Update docs/Parameters.rst

* Update include/LightGBM/config.h

* 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>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-03-02 10:35:07 +08:00
Nikita Titov b305a43226
fixed cpplint issues and updated docs (#2830) 2020-02-27 08:43:53 +08: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
Guolin Ke d20ceac77c
decouple bagging with num_threads (#2804)
* fix bagging

* fixed cpplint issues

* updated docs

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-02-26 13:03:57 +08:00
Nikita Titov 060c681dbf
[docs] Added subsections into param list (#2779)
* added possibility to render nested sections in params

* reorganize param sections

* reorder params
2020-02-24 08:09:58 +08:00
Nikita Titov 997a469f78
fixed metric_freq param description (#2780) 2020-02-20 13:52:48 +08:00