scores: Pruning Scores

View source: R/pruningScoring.R

scoresR Documentation

Pruning Scores

Description

This function calculates the score for each pruning of tree_alpha_list.

Usage

scores(N, Lv_notLv, x, y, fold, numStop, Tk, tree_alpha_list)

Arguments

N

Number of rows in data.

Lv_notLv

List with train and test sets.

x

Column input indexes in data.

y

Column output indexes in data.

fold

Parts in which the original data set is divided to perform Cross-Validation.

numStop

Minimum number of observations on a node to be split.

Tk

Best pruned tree.

tree_alpha_list

List with all the possible pruning and its associated alpha.

Value

List with the best pruning for each fold, the pruning with a lower score and tree_alpha_list with scores updated.


eat documentation built on Jan. 10, 2023, 5:13 p.m.