1. 21 Mar, 2020 3 commits
  2. 20 Mar, 2020 3 commits
    • James Lamb's avatar
    • Alberto Ferreira's avatar
      Fix SWIG methods that return char** (#2850) · 91185c3a
      Alberto Ferreira authored
      
      
      * [swig] Fix SWIG methods that return char** with StringArray.
      
      + [new] Add StringArray class to manage and manipulate arrays of fixed-length strings:
      
        This class is now used to wrap any char** parameters, manage memory and
        manipulate the strings.
      
        Such class is defined at swig/StringArray.hpp and wrapped in StringArray.i.
      
      + [API+fix] Wrap LGBM_BoosterGetFeatureNames it resulted in segfault before:
      
        Added wrapper LGBM_BoosterGetFeatureNamesSWIG(BoosterHandle) that
        only receives the booster handle and figures how much memory to allocate
        for strings and returns a StringArray which can be easily converted to String[].
      
      + [API+safety] For consistency, LGBM_BoosterGetEvalNamesSWIG was wrapped as well:
      
        * Refactor to detect any kind of errors and removed all the parameters
          besides the BoosterHandle (much simpler API to use in Java).
        * No assumptions are made about the required string space necessary (128 before).
        * The amount of required string memory is computed internally
      
      + [safety] No possibility of undefined behaviour
      
        The two methods wrapped above now compute the necessary string storage space
        prior to allocation, as the low-level C API calls would crash the process
        irreversibly if they write more memory than which is passed to them.
      
      * Changes to C API and wrappers support char**
      
      To support the latest SWIG changes that enable proper char**
      return support that is safe, the C API was changed.
      
      The respecive wrappers in R and Python were changed too.
      
      * Cleanup indentation in new lightgbm_R.cpp code
      
      * Adress review code-style comments.
      
      * Update swig/StringArray.hpp
      Co-Authored-By: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/basic.py
      Co-Authored-By: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update src/lightgbm_R.cpp
      Co-Authored-By: default avatarNikita Titov <nekit94-08@mail.ru>
      Co-authored-by: default avataralberto.ferreira <alberto.ferreira@feedzai.com>
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      91185c3a
    • Lukas Pfannschmidt's avatar
      [python] handle RandomState object in Scikit-learn Api (#2904) · cf0a992e
      Lukas Pfannschmidt authored
      
      
      * Add handling of RandomState object, which is standard for sklearn methods.
      
      LightGBM expects an integer seed instead of an object.
      If passed object is RandomState, we choose random integer based on its state to seed the underlying low level code.
      While chosen random integer is only in the range between 1 and 1e10 I expect it to have enough entropy (?) to not matter in practice.
      
      * Add RandomState object to random_state docstring.
      
      * remove blank line
      
      * Use property to handle setting random_state.
      This enables setting cloned estimators with the set_params method in sklearn.
      
      * Add docstring to attribute.
      
      * Fix and simplify docstring.
      
      * Add test case.
      
      * Use maximal int for datatype in seed derivation.
      
      * Replace random_state property with interfacing in fit method.
      Derives int seed for C code only when fitting and keeps RandomState object as param.
      
      * Adapt unit test to property change.
      
      * Extended test case and docstring
      Co-Authored-By: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Add more equality checks (feature importance, best iteration/score).
      
      * Add equality comparison of boosters represented by strings.
      Remove useless best_iteration_ comparison (we do not use early_stopping).
      
      * fix whitespace
      
      * Test if two subsequent fits produce different models
      
      * Apply suggestions from code review
      Co-Authored-By: default avatarNikita Titov <nekit94-08@mail.ru>
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      cf0a992e
  3. 19 Mar, 2020 1 commit
  4. 17 Mar, 2020 2 commits
  5. 16 Mar, 2020 4 commits
  6. 15 Mar, 2020 1 commit
  7. 14 Mar, 2020 2 commits
  8. 12 Mar, 2020 1 commit
  9. 11 Mar, 2020 1 commit
  10. 10 Mar, 2020 2 commits
  11. 08 Mar, 2020 3 commits
  12. 07 Mar, 2020 1 commit
    • Guolin Ke's avatar
      add more bots (#2843) · 018bdd3f
      Guolin Ke authored
      * Create release-drafter.yml
      
      * Create no-response.yml
      
      * disable comments
      
      * Apply suggestions from code review
      
      * Update release-drafter.yml
      
      * Apply suggestions from code review
      
      * Update .vsts-ci.yml
      018bdd3f
  13. 06 Mar, 2020 3 commits
  14. 05 Mar, 2020 3 commits
  15. 04 Mar, 2020 5 commits
  16. 03 Mar, 2020 5 commits