def precision_single_class(correctly_assigned, total_assigned):
    """
    Computes the precision for a single class

    :rtype : float
    :param correctly_assigned: Samples correctly assigned to the class
    :param total_assigned: Total samples assigned to the class
    :return: The precision value
    """

    # simply returning the precision value
    return float(correctly_assigned) / float(total_assigned)