def data_split(data, ratio=0.2):
    """Split data set into train/test set with a ratio procentage as test.
    This function creates a copy of the data set into a train and test set
    defined by the split ratio.
    
    Args:
        data (ndarray): The data set stored with observations as rows.\n
        ratio (float): The ratio of how large the test set is (deafult 0.2).\n
        
    Yields:
        train (ndarray): Train data set.\n
        test (ndaray): Test data set.\n
    
    Examples:
        Split the data set with 20% left as test data (known as unseen).
        
        >>> train, test = data_split(data, 0.2)
    """
    split = int(len(data) - len(data)*ratio)
    train = data[0:split, ]
    test = data[split:, ]
    return((train, test))