(self)
return candidates[np.argmax(scores)]
Generate several LHDs with increasing seed.
        
        Maximum S = min(dimensionality,max_seed_size).
        From S candidate designs, the one with the best intersite distance is returned

        :return: data matrix, size N x D.
Generate several LHDs with increasing seed.
        
        Maximum S = min(dimensionality,max_seed_size).
        From S candidate designs, the one with the best intersite distance is returned
Generate several LHDs with increasing seed . Maximum S = min ( dimensionality max_seed_size ) . From S candidate designs the one with the best intersite distance is returned
def create_design(self):
        """
        Generate several LHDs with increasing seed.
        
        Maximum S = min(dimensionality,max_seed_size).
        From S candidate designs, the one with the best intersite distance is returned

        :return: data matrix, size N x D.
        """
        candidates = []
        scores = []

        for i in np.arange(1, min(self.size, self._max_seed_size) + 1):
            if i < 3:
                # Hardcoded seeds for 1 or two points.
                seed = np.arange(1, i + 1)[:, None] * np.ones((1, self.domain.size))
            else:
                # Generate larger seeds recursively by creating small TPLHD's
                seed = LatinHyperCube(i, self.domain, max_seed_size=i - 1).generate()

            # Create all designs and compute score
            X = self._tplhd_design(seed)
            candidates.append(X)
            scores.append(np.min(pdist(X)))

        # Transform best design (highest score) to specified domain
        return candidates[np.argmax(scores)]
def create_design ( self ) : candidates = [ ] scores = [ ] for i in np . arange ( 1 , min ( self . size , self . _max_seed_size ) + 1 ) : if i < 3 : # Hardcoded seeds for 1 or two points. seed = np . arange ( 1 , i + 1 ) [ : , None ] * np . ones ( ( 1 , self . domain . size ) ) else : # Generate larger seeds recursively by creating small TPLHD's seed = LatinHyperCube ( i , self . domain , max_seed_size = i - 1 ) . generate ( ) # Create all designs and compute score X = self . _tplhd_design ( seed ) candidates . append ( X ) scores . append ( np . min ( pdist ( X ) ) ) # Transform best design (highest score) to specified domain return candidates [ np . argmax ( scores ) ]