Skip to content

Commit

Permalink
Removed measurement of hierarchy-related measures
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenLieber committed Dec 9, 2018
1 parent 514dc15 commit 8101710
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/utils/SubsumptionDetector.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class SubsumptionDetector(RestrictionTypeDetector):
def __init__(self):
super(SubsumptionDetector, self).__init__()

self.addResult(MEASURE_HIERARCHY_OCCURRENCE, 0, TYPE_INT)
#self.addResult(MEASURE_HIERARCHY_OCCURRENCE, 0, TYPE_INT)
self.addResult(MEASURE_OCCURRENCE, 0, TYPE_INT)
self.addResult(MEASURE_HIERARCHY_AVERAGE_DEPTH, 0.0, TYPE_FLOAT)
self.addResult(MEASURE_HIERARCHY_MEDIAN_DEPTH, 0.0, TYPE_FLOAT)
self.addResult(MEASURE_HIERARCHY_MIN_DEPTH, 0, TYPE_INT)
self.addResult(MEASURE_HIERARCHY_MAX_DEPTH, 0, TYPE_INT)
#self.addResult(MEASURE_HIERARCHY_AVERAGE_DEPTH, 0.0, TYPE_FLOAT)
#self.addResult(MEASURE_HIERARCHY_MEDIAN_DEPTH, 0.0, TYPE_FLOAT)
#self.addResult(MEASURE_HIERARCHY_MIN_DEPTH, 0, TYPE_INT)
#self.addResult(MEASURE_HIERARCHY_MAX_DEPTH, 0, TYPE_INT)

def getRestrictionType(self):
return "subsumption"
Expand Down
15 changes: 9 additions & 6 deletions src/utils/SubsumptionDetectorRdfsSubClassOf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ def compute(self):
else:
average_depth=0

self.setAll(amount_hierarchies=len(hierarchies_depths),
amount_subclasses=self.c,
average=average_depth,
median=median(hierarchies_depths) if hierarchies_depths else 0,
min=min(hierarchies_depths) if hierarchies_depths else 0,
max=max(hierarchies_depths) if hierarchies_depths else 0)
self.setAmountSubclasses(self.c);

# We are not considering other measures than occurrence in the current version
#self.setAll(amount_hierarchies=len(hierarchies_depths),
# amount_subclasses=self.c,
# average=average_depth,
# median=median(hierarchies_depths) if hierarchies_depths else 0,
# min=min(hierarchies_depths) if hierarchies_depths else 0,
# max=max(hierarchies_depths) if hierarchies_depths else 0)


0 comments on commit 8101710

Please sign in to comment.