import random


def split_dataset(ids, validation_split=0.2):
    """Split dataset for training and validation."""
    random.shuffle(ids)
    split_index = int((1 - validation_split) * len(ids))
    train_ids = ids[:split_index]
    valid_ids = ids[split_index:]
    print('Training count: %s' % len(train_ids))
    print('Validation instance count: %s' % len(valid_ids))
    return {'train_ids': train_ids,
            'valid_ids': valid_ids}