Computes the optimum k_choices of trajectories
        from the input_sample.

        Arguments
        ---------
        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

def sample(self, input_sample, num_samples, num_params,
               k_choices, num_groups=None):
        """Computes the optimum k_choices of trajectories
        from the input_sample.

        Arguments
        ---------
        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
        """
        self.run_checks(num_samples, k_choices)
        maximum_combo = self._sample(input_sample, num_samples,
                                     num_params, k_choices, num_groups)

        assert isinstance(maximum_combo, list)

        output = self.compile_output(input_sample,
                                     num_samples,
                                     num_params,
                                     maximum_combo,
                                     num_groups)
        return output