Set<String> childConcepts = new HashSet<String>();
addSubtree(childConcepts, cr);
for (String childConceptId : childConcepts) {
// only add the child to the map if it exists in the corpus
if (conceptICMap.containsKey(childConceptId)) {
FeatureRank chd = mapChildConcept.get(childConceptId);
// create the child if it does not already exist
if (chd == null) {
chd = new FeatureRank(fe, childConceptId, 0d);
mapChildConcept.put(childConceptId, chd);
}
// give the child the mutual info of the parent with the highest
// score
double rawEvaluation = conceptRawEvalMap
.containsKey(childConceptId) ? conceptRawEvalMap
.get(childConceptId) : minInfo;
double imputedEvaluation = (imputeWeight * parentConcept
.getEvaluation())
+ ((1 - imputeWeight) * rawEvaluation);
if (chd.getEvaluation() < imputedEvaluation) {
chd.setEvaluation(imputedEvaluation);
}
// add the relationship to the parentChildMap
// do this only if the childParentMap is not null
if (childParentMap != null) {
Set<FeatureRank> parents = childParentMap.get(chd);