private TreeEnsemble GetBinaryEnsemble(int classID)
 {
     var res = new TreeEnsemble();
     for (int i = classID; i < TrainedEnsemble.NumTrees; i += _numClass)
     {
         // Ignore dummy trees.
         if (TrainedEnsemble.GetTreeAt(i).NumLeaves > 1)
             res.AddTree(TrainedEnsemble.GetTreeAt(i));
     }
     return res;
 }
예제 #2
0
        private Ensemble GetBinaryEnsemble(int classID)
        {
            var      numClass = Objective.NumClass;
            Ensemble res      = new Ensemble();

            for (int i = classID; i < TrainedEnsemble.NumTrees; i += numClass)
            {
                res.AddTree(TrainedEnsemble.GetTreeAt(i));
            }
            return(res);
        }
 private FastTree.Internal.Ensemble GetBinaryEnsemble(int classID)
 {
     FastTree.Internal.Ensemble res = new FastTree.Internal.Ensemble();
     for (int i = classID; i < TrainedEnsemble.NumTrees; i += _numClass)
     {
         // Ignore dummy trees.
         if (TrainedEnsemble.GetTreeAt(i).NumLeaves > 1)
         {
             res.AddTree(TrainedEnsemble.GetTreeAt(i));
         }
     }
     return(res);
 }
예제 #4
0
        private InternalTreeEnsemble GetBinaryEnsemble(int classID)
        {
            var res = new InternalTreeEnsemble();

            for (int i = classID; i < TrainedEnsemble.NumTrees; i += _numberOfClassesIncludingNan)
            {
                // Ignore dummy trees.
                if (TrainedEnsemble.GetTreeAt(i).NumLeaves > 1)
                {
                    res.AddTree(TrainedEnsemble.GetTreeAt(i));
                }
            }
            return(res);
        }