This function calculates the score for each pruning of tree_alpha_list.
scores(N, Lv_notLv, x, y, fold, numStop, Tk, tree_alpha_list)
List with the best pruning for each fold, the pruning with a lower score and tree_alpha_list with scores updated.
Number of rows in data.
List with train and test sets.
Column input indexes in data.
Column output indexes in data.
Parts in which the original data set is divided to perform Cross-Validation.
Minimum number of observations on a node to be split.
Best pruned tree.
List with all the possible pruning and its associated alpha.