Several fixes (#2572)

* repared serialization after update process; fixes #2545

* non-stratified folds in python could omit some data instances

* Makefile: fixes for older makes on windows; clean R-package too

* make cub to be a shallow submodule

* improve $(MAKE) recovery
This commit is contained in:
Vadim Khotilovich
2017-08-06 13:03:50 -05:00
committed by GitHub
parent 70b65a282c
commit 2b3a4318c5
4 changed files with 22 additions and 10 deletions

View File

@@ -235,8 +235,7 @@ def mknfold(dall, nfold, param, seed, evals=(), fpreproc=None, stratified=False,
idx = np.random.permutation(dall.num_row())
else:
idx = np.arange(dall.num_row())
kstep = int(len(idx) / nfold)
idset = [idx[(i * kstep): min(len(idx), (i + 1) * kstep)] for i in range(nfold)]
idset = np.array_split(idx, nfold)
elif folds is not None and isinstance(folds, list):
idset = [x[1] for x in folds]
nfold = len(idset)