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

39 Коммитов

Автор SHA1 Сообщение Дата
Nikita Titov 96583ab589
[python] migrate to pathlib in setup.py and use `absolute()` on paths first (#4444)
* use absolute() on paths first

* migrate to pathlib in setup.py
2021-07-10 16:18:50 +03:00
Nikita Titov 03469ae59b
[tests][python] refactor file loading routine in C API test (#4437)
* refactor file loading in C API test

* continue
2021-07-04 17:10:48 -05:00
Nikita Titov cff80442e1
[python] migrate to pathlib in python tests (#4435) 2021-07-03 23:31:41 -05:00
Nikita Titov 45ac271ba9
[python] replace numpy.zeros with numpy.empty for the speedup (#4410) 2021-06-27 15:58:25 +03:00
Nikita Titov 272fedb95a
[tests][python] Handle data types more accurate in C API test (#4297) 2021-05-20 15:22:18 +03:00
sayantan sadhu b423cb47fe
Improved the syntax of the fstrings (#4294) 2021-05-16 18:13:16 -05:00
Zhuyi Xue 07d7b7972f
[ci][python] apply isort to tests/c_api_test/test_.py #3958 (#3975) 2021-02-15 20:56:46 +03: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
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 eedc1a7f6f
[python][tests] unused and missing imports (#3023) 2020-04-25 19:48:34 +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
Nikita Titov 1f1dc4521e
[tests][python] refined python tests (#2483)
* speed up tests

* more updates

* fixed pylint

* updated tests

* Update test_sklearn.py

* test that indices are sorted internally
2019-10-27 03:58:31 +03:00
Nikita Titov 00d1e6938a
[python] removed unused pylint directives (#2466) 2019-10-27 03:18:10 +03:00
Guolin Ke dee72159d3
check the shape for mat, csr and csc in prediction (#2464)
* check the shape for mat, csr and csc

* guess from csr

* support file checking

* better error msg

* grammar

* clean code

* code clean

* check range for CSR

* Update test_.py

* Update test_.py

* added tests
2019-10-03 23:19:25 +08:00
Nikita Titov ccf2570ca3 [docs][ci][python] added docstring style test and fixed errors in existing docstrings (#1759)
* added docstring style test and fixed errors in existing docstrings

* hotfix

* hotfix

* fix grammar

* hotfix
2018-10-16 14:19:36 +08:00
Nikita Titov 108e80f2bd
[tests] fixed codestyle, removed unused code and added several new checks (#1688)
* break huge lines in sklearn tests

* break huge line in plotting tests

* break huge lines in basic tests

* multiple enhancements in engine tests

* multiple enhancements in sklearn tests

* hotfixes

* break huge lines and use with statement in C API test

* make NDCG test more strict
2018-10-11 11:46:04 +03:00
Nikita Titov 5fd47b36d1 [test] slight C_API test refactoring (#1655)
* renamed functions

* updated find_lib function
2018-09-10 11:27:44 +08:00
Nikita Titov c77153a1c5 add NumModelPerIteration and NumberOfTotalModel in C_API (#1613)
* added NumberOfTotalModel and NumModelPerIteration to C_API and python-package

* fixed tests

* added tests for current_iteration, num_trees, num_model_per_iteration methods

* break huge line in test

* hotfix
2018-08-27 10:06:43 +08:00
Guolin Ke 941068eea8
add start_iteration in model saving (#1565)
* add start_iteration in model saving

* fix test

* shuffle models ability

* fix bug

* update document

* refine

* Update engine.py

* Update basic.py

* fix comments

* fix comment
2018-08-22 23:10:39 +08:00
Nikita Titov a39c848e64
[docs][python] made OS detection more reliable and little docs improvements (#1414)
* added missed description of plot_example in python_guide folder and fixed consistency for packages naming

* more reliable OS detection

* fixed grammar

* made pylint happy
2018-06-03 12:46:59 +03:00
Nikita Titov 8984111f05 [python] [setup] improving installation (#880)
* disabled logs from compilers; fixed #874

* fixed safe clear_fplder

* added windows folder to manifest.in

* added windows folder to build

* added library path

* added compilation with MSBuild from .sln-file

* fixed unknown PlatformToolset returns exitcode 0

* hotfix

* updated Readme

* removed return

* added installation with mingw test to appveyor

* let's test appveyor with both VS 2015 and VS 2017; but MinGW isn't installed on VS 2017 image

* fixed built-in name 'file'

* simplified appveyor

* removed excess data_files

* fixed unreadable paths

* separated exceptions for cmake and mingw

* refactored silent_call

* don't create artifacts with VS 2015 and mingw

* be more precise with python versioning in Travis

* removed unnecessary if statement

* added classifiers for PyPI and python versions badge

* changed python version in travis

* added support of scikit-learn 0.18.x

* added more python versions to Travis

* added more python versions to Appveyor

* reduced number of tests in Travis

* Travis trick is not needed anymore

* attempt to fix according to https://github.com/Microsoft/LightGBM/pull/880#discussion_r137438856
2017-09-08 18:17:00 +08:00
wxchan a4ab155368 [python] refine: solve several trivial issues (#753)
* refine python codes

* fix appveryor test

* add note to feature_importances
2017-08-18 18:52:22 +08:00
Guolin Ke 80c641cd17 [python] Submit to PyPI (#635)
* add make command to the python package.

* Update README.rst

* Update README.rst

* Update README.rst

* fix tests.

* fix unix build

* update readme

* fix setup.py

* update travis

* Update .travis.yml

* Update test.py

* some fixes.

* check the 64-bit python

* fix build.

* refine MANIFEST.in

* update Manifest.in

* add more build options.

* Add fatal in cmake

* fix a endif.

* fix bugs.

* fix pep8

* add test for the pip package build

* add test pip install in travis.

* fix version with pre-compile dll

* fix readme.rst

* update readme
2017-06-20 13:17:02 +08:00
Guolin Ke 4d2aa8403c Add Appveyor for windows CI (#634)
* add appveyor

* add nuget and artifacts

* Update appveyor.yml

* remove python27 test
2017-06-18 19:44:57 +08:00
Guolin Ke 6d4c7b03b7 Support early stopping of prediction in CLI (#565)
* fix multi-threading.

* fix name style.

* support in CLI version.

* remove warnings.

* Not default parameters.

* fix if...else... .

* fix bug.

* fix warning.

* refine c_api.

* fix R-package.

* fix R's warning.

* fix tests.

* fix pep8 .
2017-05-30 18:28:17 +08:00
cbecker 993bbd5f91 Add prediction early stopping (#550)
* Add early stopping for prediction

* Fix GBDT if-else prediction with early stopping

* Small C++ embelishments to early stopping API and functions

* Fix early stopping efficiency issue by creating a singleton for no early stopping

* Python improvements to early stopping API

* Add assertion check for binary and multiclass prediction score length

* Update vcxproj and vcxproj.filters with new early stopping files

* Remove inline from PredictRaw(), the linker was not able to find it otherwise
2017-05-29 23:09:58 +08:00
Tsukasa OMOTO babf01c2f6 python: use pytest for tests (#498)
https://docs.pytest.org/
2017-05-11 13:27:18 +08:00
wxchan f893fbf6f2 simplify Dataset class (#163)
* simplify Dataset class

* simplify check output; fix deprecated warning
2017-01-05 12:40:30 +08:00
wxchan dd425973a5 python code style with pep8 (#161)
* format python code with pep8

* **DO NOT MERGE** deliberately break rules to see what will happen during check

* Revert "**DO NOT MERGE** deliberately break rules to see what will happen during check"

This reverts commit 0db93cd7a4.

* fix format in test.py

* add docs for pep-8
2017-01-04 15:19:12 +08:00
Guolin Ke 72c2d79087 some refine for c_api (#152)
1. add csc support
2. some data type from float to double
2016-12-31 14:48:19 +08:00
Guolin Ke 1cb3aa4ed3 fix test c_api 2016-12-23 14:35:05 +08:00
Guolin Ke 0612dcc08d support get subset of dataset 2016-11-26 14:44:48 +08:00
Guolin Ke 14a67b7e8c support dynamic change training data and add validation data 2016-11-24 03:17:25 +08:00
Guolin Ke 422c0ef728 almost finish, need some tests 2016-11-23 22:04:46 +08:00
Guolin Ke fc383361b7 remove data name in metric 2016-11-23 16:49:02 +08:00
Guolin Ke a178b75b67 change some c_api interfaces for better compatibility 2016-11-22 14:39:03 +08:00
Guolin Ke a44bc1cae4 update travis, clean code 2016-11-15 16:21:33 +08:00
Guolin Ke 4a451b89cf support predict from file. add more tests 2016-11-15 16:20:53 +08:00
Guolin Ke 652d16183b add a small c_api test 2016-11-15 16:08:34 +08:00