コード例 #1
0
        /// <summary>
        /// 决策树可视化
        /// </summary>
        private void createTreeView()
        {
            DataMode       data = new DataMode();
            TreeController Tree = new TreeController();
            ID3_Algorithm  id   = new ID3_Algorithm();

            Tree.initialFlash();
            Tree.initialisBuild();

            string[,] dataArray = data.getData();
            rootName            = Tree.getTreeNodeName(0);

            rootNode.Text = rootName;
            rootNode.Name = rootName;
            rootNode.Tag  = rootName;
            DecisiontreeView.Nodes.Add(rootNode);
            Tree.createChild(rootNode, rootName);
            temp.Name = rootNode.LastNode.Name;
            temp.Text = rootNode.LastNode.Text;
            temp.Tag  = rootNode.LastNode.Tag;

            Tree.createTree(temp);
            DecisiontreeView.ExpandAll();
        }