lib/lightgbm/dataset.rb in lightgbm-0.1.5 vs lib/lightgbm/dataset.rb in lightgbm-0.1.6
- old
+ new
@@ -101,15 +101,10 @@
def save_binary(filename)
check_result FFI.LGBM_DatasetSaveBinary(handle_pointer, filename)
end
- # not released yet
- # def dump_text(filename)
- # check_result FFI.LGBM_DatasetDumpText(handle_pointer, filename)
- # end
-
def subset(used_indices, params: nil)
# categorical_feature passed via params
params ||= self.params
Dataset.new(nil,
params: params,
@@ -126,9 +121,13 @@
# must use proc instead of stabby lambda
proc { FFI.LGBM_DatasetFree(pointer) }
end
private
+
+ def dump_text(filename)
+ check_result FFI.LGBM_DatasetDumpText(handle_pointer, filename)
+ end
def field(field_name)
num_data = self.num_data
out_len = ::FFI::MemoryPointer.new(:int)
out_ptr = ::FFI::MemoryPointer.new(:float, num_data)