def get_matrix_mask(matrix, threshold=0, mask_value=1):
    """
    Mask the numbers in a given matrix.

    Parameters
    ----------
    matrix: pandas dataframe of shape = [n_features, n_features]
    threshold: float, default=0
        The correlation threshold above which a feature will be deemed correlated with
        another one and removed from the dataset.
    mask_value float, default=1
    """
    matrix_mask = matrix.copy()
    # When looking along the columns (left to right).
    # When a value is less than 0, it means the variance (std) of feature A in the column is
    # smaller than feature B in the index
    # Then we want to drop feature A because it has smaller std, we assign number -1 to mark it
    matrix_mask[matrix_mask <= threshold] = -1 * mask_value
    matrix_mask[matrix_mask > threshold] = 1 * mask_value
    return matrix_mask