R/rb4model.R
ForwardSelection.Rd
Implement forward feature selection and return data with selected features Uses root mean squared error for regression and accuracy for classification
ForwardSelection( my_mod, feature, label, min_f = 1, max_f = NA, type = "classification", cv = 3 )
my_mod | model name in string (must be in caret::modelLookup()) |
---|---|
feature | training dataset with features |
label | training dataset with labels. |
min_f | minimum amount of features to select |
max_f | maximum amount of features to select |
type | problem type. (Must be 'regression' or 'classification') |
cv | number of folds for cross validation |
The dataset with selected features.
#>#>#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> Warning: invalid mtry: reset to within valid range#> note: only 1 unique complexity parameters in default grid. Truncating the grid to 1 . #> #> note: only 1 unique complexity parameters in default grid. Truncating the grid to 1 . #> #> note: only 1 unique complexity parameters in default grid. Truncating the grid to 1 . #>#> Sepal.Width #> 1 3.5 #> 2 3.0 #> 3 3.2 #> 4 3.1 #> 5 3.6 #> 6 3.9 #> 7 3.4 #> 8 3.4 #> 9 2.9 #> 10 3.1 #> 11 3.7 #> 12 3.4 #> 13 3.0 #> 14 3.0 #> 15 4.0 #> 16 4.4 #> 17 3.9 #> 18 3.5 #> 19 3.8 #> 20 3.8 #> 21 3.4 #> 22 3.7 #> 23 3.6 #> 24 3.3 #> 25 3.4 #> 26 3.0 #> 27 3.4 #> 28 3.5 #> 29 3.4 #> 30 3.2 #> 31 3.1 #> 32 3.4 #> 33 4.1 #> 34 4.2 #> 35 3.1 #> 36 3.2 #> 37 3.5 #> 38 3.6 #> 39 3.0 #> 40 3.4 #> 41 3.5 #> 42 2.3 #> 43 3.2 #> 44 3.5 #> 45 3.8 #> 46 3.0 #> 47 3.8 #> 48 3.2 #> 49 3.7 #> 50 3.3 #> 51 3.2 #> 52 3.2 #> 53 3.1 #> 54 2.3 #> 55 2.8 #> 56 2.8 #> 57 3.3 #> 58 2.4 #> 59 2.9 #> 60 2.7 #> 61 2.0 #> 62 3.0 #> 63 2.2 #> 64 2.9 #> 65 2.9 #> 66 3.1 #> 67 3.0 #> 68 2.7 #> 69 2.2 #> 70 2.5 #> 71 3.2 #> 72 2.8 #> 73 2.5 #> 74 2.8 #> 75 2.9 #> 76 3.0 #> 77 2.8 #> 78 3.0 #> 79 2.9 #> 80 2.6 #> 81 2.4 #> 82 2.4 #> 83 2.7 #> 84 2.7 #> 85 3.0 #> 86 3.4 #> 87 3.1 #> 88 2.3 #> 89 3.0 #> 90 2.5 #> 91 2.6 #> 92 3.0 #> 93 2.6 #> 94 2.3 #> 95 2.7 #> 96 3.0 #> 97 2.9 #> 98 2.9 #> 99 2.5 #> 100 2.8 #> 101 3.3 #> 102 2.7 #> 103 3.0 #> 104 2.9 #> 105 3.0 #> 106 3.0 #> 107 2.5 #> 108 2.9 #> 109 2.5 #> 110 3.6 #> 111 3.2 #> 112 2.7 #> 113 3.0 #> 114 2.5 #> 115 2.8 #> 116 3.2 #> 117 3.0 #> 118 3.8 #> 119 2.6 #> 120 2.2 #> 121 3.2 #> 122 2.8 #> 123 2.8 #> 124 2.7 #> 125 3.3 #> 126 3.2 #> 127 2.8 #> 128 3.0 #> 129 2.8 #> 130 3.0 #> 131 2.8 #> 132 3.8 #> 133 2.8 #> 134 2.8 #> 135 2.6 #> 136 3.0 #> 137 3.4 #> 138 3.1 #> 139 3.0 #> 140 3.1 #> 141 3.1 #> 142 3.1 #> 143 2.7 #> 144 3.2 #> 145 3.3 #> 146 3.0 #> 147 2.5 #> 148 3.0 #> 149 3.4 #> 150 3.0