nebula.addons.trustworthiness.pillar#

Attributes#

Classes#

TrustPillar

Class to represent a trust pillar.

Module Contents#

nebula.addons.trustworthiness.pillar.logger#
class nebula.addons.trustworthiness.pillar.TrustPillar(name, metrics, input_docs, use_weights=False)#

Class to represent a trust pillar.

Parameters:
  • name (string) – Name of the pillar.

  • metrics (dict) – Metric definitions for the pillar.

  • input_docs (dict) – Input documents.

  • use_weights (bool) – True to turn on the weights in the metric config file.

name#
input_docs#
metrics#
result = []#
use_weights#
evaluate()#

Evaluate the trust score for the pillar.

Returns:

Score of [0, 1].

Return type:

float

get_notion_score(name, metrics)#

Evaluate the trust score for the notion.

Parameters:
  • name (string) – Name of the notion.

  • metrics (list) – Metrics definitions of the notion.

Returns:

Score of [0, 1].

Return type:

float

get_metric_score(result, name, metric)#

Evaluate the trust score for the metric.

Parameters:
  • result (object) – The result object

  • name (string) – Name of the metric.

  • metrics (dict) – The metric definition.

Returns:

Score of [0, 1].

Return type:

float