Esempio n. 1
0
        private TreeNode UtworzDrzewo()
        {
            TreeNode root;

            List <Atrybut> aAtrybuty = new List <Atrybut>();

            for (int i = 0; i < (this.aSystem[0].Count - 1); i++)
            {
                List <int> aWartosci = new List <int>(0);

                for (int j = 0; j < this.aSystem.Count; j++)
                {
                    aWartosci.Add(this.aSystem[j][i]);
                }

                aAtrybuty.Add(new Atrybut(i, aWartosci));
            }

            DecisionTree ID3 = new DecisionTree();

            root = ID3.MountTree(this.aSystem, aAtrybuty);

            return(root);
        }