Пример #1
0
 public MyEvaluation()
 {
     m_costMatrix = new weka.classifiers.CostMatrix(2);
     m_costMatrix.setElement(0, 0, -1);
     m_costMatrix.setElement(1, 1, -1);
     m_costMatrix.setElement(0, 1, 1);
     m_costMatrix.setElement(1, 0, 1);
 }
Пример #2
0
 public MyEvaluation()
 {
     m_costMatrix = new weka.classifiers.CostMatrix(2);
     m_costMatrix.setElement(0, 0, -1);
     m_costMatrix.setElement(1, 1, -1);
     m_costMatrix.setElement(0, 1, 1);
     m_costMatrix.setElement(1, 0, 1);
 }
Пример #3
0
 public CostMatrix(int numclasses, double[,] matrix)
 {
     Impl = new weka.classifiers.CostMatrix(numclasses);
     for (int r = 0; r < matrix.GetLength(0); r++)
     {
         for (int c = 0; c < matrix.GetLength(1); c++)
         {
             Impl.setElement(r, c, matrix[r, c]);
         }
     }
 }
Пример #4
0
 public void SetCost(double tp, double sl)
 {
     CostMatrix.setElement(0, 1, sl);
     CostMatrix.setElement(1, 1, -tp);
 }