⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sampleattribute.cs

📁 It s the Naive Bayes algorithm with import function dat-files, realized by the tools of Visual Stu
💻 CS
字号:
using System;
using System.Collections;
using System.Text;

namespace NaiveBayes
{
    class SampleAttribute
    {
        protected ArrayList values = new ArrayList();
        protected ArrayList digitizedValues = new ArrayList();
        
        protected ArrayList digitizedTypes = new ArrayList();
        protected ArrayList valueTypes = new ArrayList();

        protected enum Type { real_, char_, bool_ };
        protected Type type;

        public SampleAttribute(ArrayList values)
        {
            this.values = values;
            initializeValueTypes();
            foreach (string value in this.values)
            {
                if (!this.valueTypes.Contains(value))
                    this.valueTypes.Add(value);
            }
        }

        public void initializeValueTypes()
        {
            foreach (string value in this.values)
            {
                if (!this.valueTypes.Contains(value))
                    this.valueTypes.Add(value);
            }
        }

        //----------------------------------------------------------------------------------------------------------------
        public ArrayList getValues()
        {
            return this.values;
        }
        public ArrayList getValueTypes()
        {
            return this.valueTypes;
        }
        public ArrayList getDigitizedValues()
        {
            return this.digitizedValues;
        }
        public ArrayList getDigitizedTypes()
        {
            return this.digitizedTypes;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -