• mjmckp's avatar
    Fix for CreatePredictor function and VS2017 Debug build (#3937) · 5321fef6
    mjmckp authored
    
    
    * Fix index out-of-range exception generated by BaggingHelper on small datasets.
    
    Prior to this change, the line "score_t threshold = tmp_gradients[top_k - 1];" would generate an exception, since tmp_gradients would be empty when the cnt input value to the function is zero.
    
    * Update goss.hpp
    
    * Update goss.hpp
    
    * Add API method LGBM_BoosterPredictForMats which runs prediction on a data set given as of array of pointers to rows (as opposed to existing method LGBM_BoosterPredictForMat which requires data given as contiguous array)
    
    * Fix incorrect upstream merge
    
    * Add link to LightGBM.NET
    
    * Fix indenting to 2 spaces
    
    * Dummy edit to trigger CI
    
    * Dummy edit to trigger CI
    
    * remove duplicate functions from merge
    
    * Fix for CreatePredictor function: for VS2017 in Debug build, the previous version would end up giving an uninitialised prediction function that would throw access violation exceptions when invoked.
    Co-authored-by: default avatarmatthew-peacock <matthew.peacock@whiteoakam.com>
    Co-authored-by: default avatarGuolin Ke <guolin.ke@outlook.com>
    5321fef6
c_api.cpp 95.8 KB