1. A non-transitory computer-readable medium having stored thereon computer-readable instructions that when executed by a computing device cause the computing device to: receive an indicator of a dataset, wherein the dataset includes a target variable and a plurality of input variables; (a) receive a target indicator of the target variable to evaluate from the dataset; (b) receive an input indicator of an input variable of the plurality of input variables to evaluate from the dataset, wherein the dataset includes a plurality of values for the input variable and a plurality of target values for the target variable, wherein a value for the input variable is associated with a target value for the target variable; (c) determine a number of levels of the input variable to evaluate; (d) define a level value for each of the determined number of levels based on the plurality of values of the input variable; (e) assign the plurality of values of the input variable to a level of the determined number of levels based on the defined level value; (f) identify a maximum number of leaves of a plurality of leaves to evaluate, wherein the identified maximum number of leaves is less than or equal to the determined number of levels; (g) define a leaf assignment value for each level of the determined number of levels, wherein the leaf assignment value is less than or equal to the identified maximum number of leaves; (h) compute a decision metric for splitting data in the dataset based on the defined leaf assignment value and the assigned plurality of values of the input variable; (i) store the defined leaf assignment value and the computed decision metric; (j) increment a leaf assignment of the determined number of levels using a Gray code to define the leaf assignment value for each level of the determined number of levels, wherein the leaf assignment value for each level varies between zero and the identified maximum number of leaves; (k) repeat (h) to (j) for each valid Gray code value; (l) select a best leaf assignment for the plurality of values of the input variable and the plurality of target values of the target variable based on the computed decision metric; output the selected best leaf assignment as a node of a decision tree; receive a second indicator of a second dataset, wherein the second dataset includes a second value for the input variable; and predict a target value for the target variable, at least partially, by applying the second value for the input variable to the node of the output decision tree.