public System.Data.DataTable GetAttributes()
        {
            //construct the table column names
            System.Data.DataTable table = new System.Data.DataTable();

            table.Columns.Add("Columns", typeof(string));
            table.Columns.Add("ColumnType", typeof(string));

            if (Context.ExecuteForPrepare)
            {
                return(table);
            }


            for (uint i = 0; i < AttributeSet.GetAttributeCount(); i++)
            {
                if (!isNominal(i))
                {
                    table.Rows.Add(AttributeSet.GetAttributeDisplayName(i, false), "Continuous");
                }
                else
                {
                    if (!isTarget(i))
                    {
                        table.Rows.Add(AttributeSet.GetAttributeDisplayName(i, false), "Discrete");
                    }
                }
            }
            return(table);
        }
 /// <summary>
 /// Returns the target attribute
 /// </summary>
 /// <returns>Target attribute</returns>
 protected uint getTargetAttribute()
 {
     for (uint i = 0; i < AttributeSet.GetAttributeCount(); i++)
     {
         if (isTarget(i))
         {
             return(i);
         }
     }
     throw new Exception("No predict attribute specified");
 }
        /// <summary>
        /// returns the names of the attributes
        /// </summary>
        /// <returns></returns>
        public String[] getAttributeNames()
        {
            LinkedList <string> values = new LinkedList <string>();

            //SortedDictionary<uint, double>.Enumerator enumerator = dict.GetEnumerator();
            for (uint i = 0; i < AttributeSet.GetAttributeCount(); i++)
            {
                if (!isNominal(i))
                {
                    values.AddLast(AttributeSet.GetAttributeDisplayName(i, false));
                }
                else
                {
                    if (!isTarget(i))
                    {
                        for (uint j = 0; j < AttributeSet.GetAttributeStateCount(i); j++)
                        {
                            StateValue value = new StateValue();
                            value.SetIndex(j);
                            object valuea = AttributeSet.UntokenizeAttributeValue(i, value);
                            string name;
                            if (valuea == null)
                            {
                                name = "NULL";
                            }
                            else
                            {
                                name = valuea.ToString();
                                if (name.Equals(""))
                                {
                                    name = "NULL";
                                }
                            }
                            values.AddLast(AttributeSet.GetAttributeDisplayName(i, false) + "." + name);
                        }
                    }
                }
            }
            string[] output = new string[values.Count];
            values.CopyTo(output, 0);
            return(output);
        }