AFL.agent.Metric module#

class AFL.agent.Metric.Delaunay(data_variable='data', params=None)#

Bases: Similarity

calculate(X)#

Computes the Delaunay triangulation of the given points :param x: array of shape (num_nodes, 2) :return: the computed adjacency matrix

class AFL.agent.Metric.Distance(data_variable='data', params=None, name=None, constrain_same=None, constrain_different=None)#

Bases: Metric

calculate(dataset, **params)#
class AFL.agent.Metric.Dummy(data_variable='data', params=None, name=None, constrain_same=None, constrain_different=None)#

Bases: Metric

calculate(dataset, **params)#
class AFL.agent.Metric.Metric(data_variable='data', params=None, name=None, constrain_same=None, constrain_different=None)#

Bases: object

apply_constraints()#
calculate(*args, **kwargs)#
copy()#
normalize1()#
normalize2()#
to_dict()#
class AFL.agent.Metric.MultiMetric(metrics, data_variable='data', combine_by='prod', combine_by_powers=None, combine_by_coeffs=None, constrain_same=None, constrain_different=None, **params)#

Bases: Metric

calculate(dataset)#
prod(data_list)#
sum(data_list)#
to_dict()#
update_name()#
class AFL.agent.Metric.Similarity(data_variable='data', params=None, name=None, constrain_same=None, constrain_different=None)#

Bases: Metric

calculate(dataset, **params)#
AFL.agent.Metric.listify(obj)#