sample.cs

来自「It s the Naive Bayes algorithm with impo」· CS 代码 · 共 33 行

CS
33
字号
using System;
using System.Collections;
using System.Text;

namespace NaiveBayes
{
    class Sample
    {
        private ArrayList values = new ArrayList();
        private object targetValue;

        public Sample(ArrayList values, int index)
        {
            for (int i = 0; i < values.Count; i++)
            {
                if (i != index)
                    this.values.Add(values[i]);
                else
                    this.targetValue = values[i];
            }
        }

        public ArrayList getValues()
        {
            return this.values;
        }
        public object getTargetValue()
        {
            return this.targetValue;
        }
    }
}

⌨️ 快捷键说明

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