CNode newLeaf = new CNode(m_numAttributes, newInstance); m_children.add(newLeaf); double bestHostCU = categoryUtility(); CNode merged = new CNode(m_numAttributes); if (a != b) { mergedCU = cuScoreForBestTwoMerged(merged, a, b, newInstance); CNode mergedSplitChildren = new CNode(m_numAttributes); if (sa != sb) { splitPlusMergeBestTwoCU = cuScoreForBestTwoMerged( finalBestHost = new CNode(m_numAttributes); m_children.add(finalBestHost);
CNode newLeaf = new CNode(m_numAttributes, newInstance); m_children.add(newLeaf); double bestHostCU = categoryUtility(); CNode merged = new CNode(m_numAttributes); if (a != b) { mergedCU = cuScoreForBestTwoMerged(merged, a, b, newInstance); CNode mergedSplitChildren = new CNode(m_numAttributes); if (sa != sb) { splitPlusMergeBestTwoCU = cuScoreForBestTwoMerged( finalBestHost = new CNode(m_numAttributes); m_children.add(finalBestHost);
CNode tempNode = new CNode(m_numAttributes); tempNode.m_clusterInstances = new Instances(m_clusterInstances, 1); for (int i = 0; i < m_children.size(); i++) {
CNode tempNode = new CNode(m_numAttributes); tempNode.m_clusterInstances = new Instances(m_clusterInstances, 1); for (int i = 0; i < m_children.size(); i++) {
/** * Adds an instance to the clusterer. * * @param newInstance the instance to be added * @throws Exception if something goes wrong */ @Override public void updateClusterer(Instance newInstance) throws Exception { m_numberOfClustersDetermined = false; if (m_cobwebTree == null) { m_cobwebTree = new CNode(newInstance.numAttributes(), newInstance); } else { m_cobwebTree.addInstance(newInstance); } }
/** * Adds an instance to the clusterer. * * @param newInstance the instance to be added * @throws Exception if something goes wrong */ @Override public void updateClusterer(Instance newInstance) throws Exception { m_numberOfClustersDetermined = false; if (m_cobwebTree == null) { m_cobwebTree = new CNode(newInstance.numAttributes(), newInstance); } else { m_cobwebTree.addInstance(newInstance); } }