split.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:skutil 作者: tgsmith61591 项目源码 文件源码
def _iter_test_masks(self, frame, y=None):
        """Generates boolean masks corresponding to the tests set.

        Parameters
        ----------

        frame : H2OFrame
            The h2o frame to split

        y : string, optional (default=None)
            The column to stratify.

        Returns
        -------

        test_mask : np.ndarray, shape=(n_samples,)
            The indices for the test split
        """
        for test_index in self._iter_test_indices(frame, y):
            test_mask = np.zeros(frame.shape[0], dtype=np.bool)
            test_mask[test_index] = True
            yield test_mask
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号