def fit(self, path=None):
"""Fit sub-learner"""
if path is None:
path = self.path
t0 = time()
transformers = self._load_preprocess(path)
self._fit(transformers)
if self.out_array is not None:
self._predict(transformers, self.scorer is not None)
o = IndexedEstimator(estimator=self.estimator,
name=self.name_index,
index=self.index,
in_index=self.in_index,
out_index=self.out_index,
data=self.data)
save(path, self.name_index, o)
if self.verbose:
msg = "{:<30} {}".format(self.name_index, "done")
f = "stdout" if self.verbose < 10 - 3 else "stderr"
print_time(t0, msg, file=f)
评论列表
文章目录