def reduce_sample_size(data,classes,times=2):
    """
    Reduce sample by to 1/times.
    
    INPUTS: 
    data: numpy 2d array or matrix, each row is a sample, the original data.
    
    classes: numpy 1d array or vector, class labels, the original labels.
    
    times: int.
    
    OUTPUTS:
    data: the reduced data.
    
    clases: the reduced classes.
    """
    data=data[range(0,data.shape[0],times)]
    classes=classes[range(0,classes.shape[0],times)]
    return data,classes