Exemplo n.º 1
0
        /// <summary>
        /// Calculates the return value for a single data point, forwarding it to other leaves as needed
        /// </summary>
        public double RunDataPoint(DataPoint dataPoint)
        {
            if (IsFinal)
            {
                return(Purity);
            }

            if (DoSplit(dataPoint))
            {
                return(output1.RunDataPoint(dataPoint));
            }
            else
            {
                return(output2.RunDataPoint(dataPoint));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Calculates the value for a single DataPoint
 /// Assumes the tree is trained already
 /// </summary>
 public double RunDataPoint(DataPoint dp)
 {
     return(headnode.RunDataPoint(dp));
 }