Пример #1
0
def representativeness(S):
    #入力: getDistances()のデータ要素#
    #return representativeness objectiveness#

    tempDMat = S.getDistances()
    norm = tempDMat.mean()
    return (lambda X: (1 - ex.kmedoid_loss(X, tempDMat, float(norm))))
Пример #2
0
def uniformity(S):
    '''
    Based on representativeness_shell implementation in 'example_objectives.py'
    :input S: DataElement with function getChrDistances()
    :return: uniformity objective
    '''
    tempDMat = S.getChrDistances()
    norm = tempDMat.mean()
    return (lambda X: (1 - ex.kmedoid_loss(X, tempDMat, float(norm))))
Пример #3
0
def representativeness_shell_y(S):
    '''
        Representativeness shell Eq. (8)
    :param S: DataElement with function getDistances()
    :return: representativeness objective
    '''
    tempDMat=S.getDistancesY()
    norm=tempDMat.mean()
    return (lambda X: (1 - ex.kmedoid_loss(X,tempDMat,float(norm))))
Пример #4
0
def representativeness_shell_y(S):
    '''
        Representativeness shell Eq. (8)
    :param S: DataElement with function getDistances()
    :return: representativeness objective
    '''
    tempDMat = S.getDistancesY()
    norm = tempDMat.mean()
    return (lambda X: (1 - ex.kmedoid_loss(X, tempDMat, float(norm))))
Пример #5
0
def uniformity(S):
    #入力:S(getChrDistance()のデータ要素)#
    #return: uniformity objective#
    tempDMat = S.getChrDistances()
    norm = tempDMat.mean()
    return (lambda X: (1 - ex.kmedoid_loss(X, tempDMat, float(norm))))