darch/searchers.py
def sample_models(self, num_samples):
        """Generates random specified models in the search space and evaluates
        them based on the currect surrogate model.

        The function returns the epoch number, the specified models, and the
        history of choices that lead to those particular models.

        """

        models = []
        choice_hists = []

        for _ in xrange(num_samples):
            # initialization of the model.
            bk = copy.deepcopy(self.b_search)
            bk.initialize(self.in_d, Scope())

            tree_hist = self._tree_walk(bk)
            #print tree_hist
            roll_hist = self._rollout_walk(bk)
            hist = ( tuple(tree_hist), tuple(roll_hist) )

            models.append(bk)
            choice_hists.append( hist )

        return (tuple(models), tuple(choice_hists))
Generates random specified models in the search space and evaluates
        them based on the currect surrogate model.

        The function returns the epoch number, the specified models, and the
        history of choices that lead to those particular models.

        
Generates random specified models in the search space and evaluates
them based on the currect surrogate model.

The function returns the epoch number, the specified models, and the
history of choices that lead to those particular models.
Generates random specified models in the search space and evaluates them based on the currect surrogate model . The function returns the epoch number the specified models and the history of choices that lead to those particular models .
def sample_models(self, num_samples):
        models = []
        choice_hists = []
        for _ in xrange(num_samples):
            bk = copy.deepcopy(self.b_search)
            bk.initialize(self.in_d, Scope())
            tree_hist = self._tree_walk(bk)
            roll_hist = self._rollout_walk(bk)
            hist = ( tuple(tree_hist), tuple(roll_hist) )
            models.append(bk)
            choice_hists.append( hist )
        return (tuple(models), tuple(choice_hists))
def sample_models ( self , num_samples ) : models = [ ] choice_hists = [ ] for _ in xrange ( num_samples ) : bk = copy . deepcopy ( self . b_search ) bk . initialize ( self . in_d , Scope ( ) ) tree_hist = self . _tree_walk ( bk ) roll_hist = self . _rollout_walk ( bk ) hist = ( tuple ( tree_hist ) , tuple ( roll_hist ) ) models . append ( bk ) choice_hists . append ( hist ) return ( tuple ( models ) , tuple ( choice_hists ) )
Generates random specified models in the search space and evaluates
them based on the currect surrogate model.
Generates random specified models in the search space and evaluates them based on the currect surrogate model .
"""Generates random specified models in the search space and evaluates
        them based on the currect surrogate model.

        The function returns the epoch number, the specified models, and the
        history of choices that lead to those particular models.

        """ # initialization of the model. #print tree_hist
self
num_samples