model_assessment.py 文件源码

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

项目:palladio 作者: slipguru 项目源码 文件源码
def _fit_slave(self, X, y):
        """Pipeline evaluation.

        Parameters
        ----------
        X : array of float, shape : n_samples x n_features, default : ()
            The input data matrix.
        """
        try:
            while True:
                status_ = MPI.Status()
                received = COMM.recv(source=0, tag=MPI.ANY_TAG, status=status_)

                # check the tag of the received message
                if status_.tag == EXIT:
                    return
                # do the work
                i, (train_index, test_index) = received
                # if self.verbose:
                #     print("[{} {}]: Performing experiment {}".format(
                #         NAME, RANK, i))

                cv_results_ = _worker(self, i, X, y, train_index, test_index)
                # if self.verbose:
                #     print("[{} {}]: Experiment {} completed".format(
                #         NAME, RANK, i))
                COMM.send(cv_results_, dest=0, tag=0)

        except StandardError as exc:
            warnings.warn("Quitting ... TB:", str(exc))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号