lib/lightgbm/booster.rb in lightgbm-0.1.2 vs lib/lightgbm/booster.rb in lightgbm-0.1.3
- old
+ new
@@ -75,10 +75,10 @@
end
num_feature = self.num_feature
out_result = ::FFI::MemoryPointer.new(:double, num_feature)
check_result FFI.LGBM_BoosterFeatureImportance(handle_pointer, iteration, importance_type, out_result)
- out_result.read_array_of_double(num_feature)
+ out_result.read_array_of_double(num_feature).map(&:to_i)
end
def model_from_string(model_str)
out_num_iterations = ::FFI::MemoryPointer.new(:int)
check_result FFI.LGBM_BoosterLoadModelFromString(model_str, out_num_iterations, @handle)