def F_calc(TP, FP, FN, beta):
    """
    Calculate F-score.

    :param TP: true positive
    :type TP : int
    :param FP: false positive
    :type FP : int
    :param FN: false negative
    :type FN : int
    :param beta : beta coefficient
    :type beta : float
    :return: F score as float
    """
    try:
        result = (1 + beta ** 2) * TP / ((1 + beta ** 2) * TP + FP + beta **
            2 * FN)
        return result
    except (ZeroDivisionError, TypeError):
        return 'None'
