}
private void storeIntrinsicIC(String conceptGraphName, int maxLeaves,
Map<String, IntrinsicICInfo> icInfoMap, short depthArray[],
ConceptGraph cg) {
FeatureEvaluation fe = new FeatureEvaluation();
fe.setEvaluationType("intrinsic-infocontent");
fe.setParam2(conceptGraphName);
List<FeatureRank> listFeatureRank = new ArrayList<FeatureRank>(
icInfoMap.size());
double maxIC = 0d;
short maxDepth = 0;
for (IntrinsicICInfo icInfo : icInfoMap.values()) {
ConcRel cr = icInfo.getConcept();
short depth = depthArray[cr.getNodeIndex()];
cr.setDepth(depth);
if (depth > maxDepth)
maxDepth = depth;
double ic = computeIC(icInfo, maxLeaves);
cr.setIntrinsicInfoContent(ic);
if (ic > maxIC)
maxIC = ic;
if (log.isDebugEnabled())
log.debug(icInfo.getConcept().getConceptID() + "=" + ic);
listFeatureRank.add(new FeatureRank(fe, icInfo.getConcept()
.getConceptID(), ic, depthArray[icInfo.getConcept()
.getNodeIndex()]));
}
cg.setDepthMax(maxDepth);
cg.setIntrinsicICMax(maxIC);
if ("true".equalsIgnoreCase(System
.getProperty("org.apache.ctakes.ytex.ic.debug", "false"))) {
this.classifierEvaluationDao.deleteFeatureEvaluation(null, null,
null, fe.getEvaluationType(), null, 0d, conceptGraphName);
this.classifierEvaluationDao.saveFeatureEvaluation(fe,
listFeatureRank);
}
}