Description Usage Arguments Value See Also Examples
View source: R/carrot_functions.R
Function running a single crossvalidation by partitioning the data into training and test set
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 
vari 
set of predictors 
outi 
array of outcomes 
c 
set of all indices of the predictors 
rule 
an Events per Variable (EPV) rule, defaults to 10 
part 
indicates partition of the original dataset into training and test set in a proportion 
l 
number of observations 
we 
weights of the predictors 
vari_col 
overall number of predictors 
preds 
array to write predictions into, intially empty 
mode 

cmode 

predm 

cutoff 
cutoff value for logistic regression 
objfun 

minx 
minimum number of predictors to be included in a regression, defaults to 1 
maxx 
maximum number of predictors to be included in a regression, defaults to maximum feasible number according to one in ten rule 
nr 
a subset of the dataset, such that 
maxw 
maximum weight of predictors to be included in a regression, defaults to maximum weight according to one in ten rule 
st 
a subset of predictors to be always included into a predictive model,defaults to empty set 
corr 
maximum correlation between a pair of predictors in a model 
regr 
An M x N matrix of sums of the absolute errors for each element of the test set for each feasible regression. M is maximum feasible number of variables included in a regression, N is the maximum feasible number of regressions of the fixed size; the row index indicates the number of variables included in a regression. Therefore each row corresponds to results obtained from running regressions with the same number of variables and columns correspond to different subsets of predictors used. 
regrr 
An M x N matrix of sums of the relative errors for each element of the test set (only for 
nvar 
Maximum feasible number of variables in the regression 
emp 
An accuracy of always predicting the more likely outcome as suggested by the training set (only for 
In regr
and regrr
NA
values are possible since for some numbers of variables there are fewer feasible regressions than for the others.
Uses compute_max_weight
, sum_weights_sub
, make_numeric_sets
, get_predictions_lin
, get_predictions
, get_probabilities
, AUC
, combn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.