@staticmethod
def _to_evalset(data, target, train_idx, *valid_idx):
    """
        Creating an eval_set dictionary, where key is the name
        of the sample, value is a tuple with the input samples
        and the target values.
        """
    eval_set = {'train': (data.loc[train_idx], target.loc[train_idx]),
        'valid': (data.loc[valid_idx[0]], target.loc[valid_idx[0]])}
    if len(valid_idx) == 2:
        eval_set['test'] = data.loc[valid_idx[1]], target.loc[valid_idx[1]]
    return eval_set
