enforce putting iteration numbers in train
This commit is contained in:
parent
3c1c7e2780
commit
d3bfc31e6a
@ -134,8 +134,12 @@ class Booster:
|
|||||||
xglib.XGBoosterSetParam(
|
xglib.XGBoosterSetParam(
|
||||||
self.handle, ctypes.c_char_p(k.encode('utf-8')),
|
self.handle, ctypes.c_char_p(k.encode('utf-8')),
|
||||||
ctypes.c_char_p(str(v).encode('utf-8')))
|
ctypes.c_char_p(str(v).encode('utf-8')))
|
||||||
def update(self, dtrain, it=1):
|
def update(self, dtrain, it):
|
||||||
""" update """
|
"""
|
||||||
|
update
|
||||||
|
dtrain: the training DMatrix
|
||||||
|
it: current iteration number
|
||||||
|
"""
|
||||||
assert isinstance(dtrain, DMatrix)
|
assert isinstance(dtrain, DMatrix)
|
||||||
xglib.XGBoosterUpdateOneIter(self.handle, it, dtrain.handle)
|
xglib.XGBoosterUpdateOneIter(self.handle, it, dtrain.handle)
|
||||||
def boost(self, dtrain, grad, hess):
|
def boost(self, dtrain, grad, hess):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user