Example #1
0
 public DAGSVM(ClassificationProblem problem)
 {
     this.m_problem = problem;
     this.m_n = problem.CategoryCount;
     this.m_k = m_n * (m_n - 1) / 2;
     this.m_dag = new Node(problem, 0, m_n - 1);
 }
Example #2
0
        //private bool m_isleaf;
        public Node(ClassificationProblem problem, int first, int second)
        {
            this.m_problem = problem;
            this.m_first = first;
            this.m_second = second;
            this.m_llm = new LinearLeraningMachine(problem);
            this.m_llm.Train();

            if (second > first + 1)
            {
                this.m_leftChild = new Node(problem, first + 1, second);
                this.m_rightChild = new Node(problem, first, second - 1);
                //this.m_isleaf = false;
            }
            else
            {
                //this.m_isleaf = true;
            }
        }