important change to regrank interface, need some more test
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import ctypes
|
||||
|
||||
# load in xgboost library
|
||||
#xglib = ctypes.cdll.LoadLibrary('./libxgboostpy.so')
|
||||
xglib = ctypes.cdll.LoadLibrary('./libxgboostpy.so')
|
||||
|
||||
# entry type of sparse matrix
|
||||
class REntry(ctypes.Structure):
|
||||
@@ -10,6 +10,13 @@ class REntry(ctypes.Structure):
|
||||
|
||||
|
||||
class DMatrix:
|
||||
def __init__(fname = None):
|
||||
self.__handle = xglib.
|
||||
|
||||
def __init__(self,fname = None):
|
||||
self.__handle = xglib.XGDMatrixCreate();
|
||||
if fname != None:
|
||||
xglib.XGDMatrixLoad(self.__handle, ctypes.c_char_p(fname), 0)
|
||||
def __del__(self):
|
||||
xglib.XGDMatrixFree(self.__handle)
|
||||
|
||||
dmata = DMatrix('xx.buffer')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user