def positive_predictive_value(real, predicted):
    """ PPV = `|True Positives| / (|True Positives| + |False Positives|)`

    Parameters
    ----------
    real : dict
        A dictionary mapping quasispecies to frequencies.

    predicted : dict
        The calculated dictionary mapping quasispecies to frequencies.

    Returns
    -------
    PPV : float
        The positive predicted value
    """
    truepos = set(predicted.keys()) & set(real.keys())
    return len(truepos) / float(len(predicted))
