(self, input_sample: np.ndarray, num_samples: int,
                          num_params: int, k_choices:int, num_groups: int=None)
return scores
Finds the 'k_choices' most distant choices from the
        'num_samples' trajectories contained in 'input_sample'

        Parameters
        ----------
        input_sample : numpy.ndarray
        num_samples : int
            The number of samples to generate
        num_params : int
            The number of parameters
        k_choices : int
            The number of optimal trajectories
        num_groups : int, default=None
            The number of groups

        Returns
        -------
        numpy.ndarray
Finds the 'k_choices' most distant choices from the
        'num_samples' trajectories contained in 'input_sample'
Finds the k_choices most distant choices from the num_samples trajectories contained in input_sample
def find_most_distant(self, input_sample: np.ndarray, num_samples: int,
                          num_params: int, k_choices:int, num_groups: int=None) -> np.ndarray:
        """
        Finds the 'k_choices' most distant choices from the
        'num_samples' trajectories contained in 'input_sample'

        Parameters
        ----------
        input_sample : numpy.ndarray
        num_samples : int
            The number of samples to generate
        num_params : int
            The number of parameters
        k_choices : int
            The number of optimal trajectories
        num_groups : int, default=None
            The number of groups

        Returns
        -------
        numpy.ndarray
        """
        # Now evaluate the (N choose k_choices) possible combinations
        if nchoosek(num_samples, k_choices) >= sys.maxsize:
            raise ValueError("Number of combinations is too large")
        number_of_combinations = int(nchoosek(num_samples, k_choices))

        # First compute the distance matrix for each possible pairing
        # of trajectories and store in a shared-memory array
        distance_matrix = self.compute_distance_matrix(input_sample,
                                                       num_samples,
                                                       num_params,
                                                       num_groups)

        # Initialise the output array
        chunk = int(1e6)
        if chunk > number_of_combinations:
            chunk = number_of_combinations

        counter = 0
        # Generate a list of all the possible combinations
        combo_gen = combinations(range(num_samples), k_choices)
        scores = np.zeros(number_of_combinations, dtype=np.float32)
        # Generate the pairwise indices once
        pairwise = np.array(
            [y for y in combinations(range(k_choices), 2)])

        mappable = self.mappable
        for combos in self.grouper(chunk, combo_gen):
            scores[(counter * chunk):((counter + 1) * chunk)] \
                = mappable(combos, pairwise, distance_matrix)
            counter += 1
        return scores
def find_most_distant ( self , input_sample : np . ndarray , num_samples : int , num_params : int , k_choices : int , num_groups : int = None ) -> np . ndarray : # Now evaluate the (N choose k_choices) possible combinations if nchoosek ( num_samples , k_choices ) >= sys . maxsize : raise ValueError ( "Number of combinations is too large" ) number_of_combinations = int ( nchoosek ( num_samples , k_choices ) ) # First compute the distance matrix for each possible pairing # of trajectories and store in a shared-memory array distance_matrix = self . compute_distance_matrix ( input_sample , num_samples , num_params , num_groups ) # Initialise the output array chunk = int ( 1e6 ) if chunk > number_of_combinations : chunk = number_of_combinations counter = 0 # Generate a list of all the possible combinations combo_gen = combinations ( range ( num_samples ) , k_choices ) scores = np . zeros ( number_of_combinations , dtype = np . float32 ) # Generate the pairwise indices once pairwise = np . array ( [ y for y in combinations ( range ( k_choices ) , 2 ) ] ) mappable = self . mappable for combos in self . grouper ( chunk , combo_gen ) : scores [ ( counter * chunk ) : ( ( counter + 1 ) * chunk ) ] = mappable ( combos , pairwise , distance_matrix ) counter += 1 return scores