Description Usage Arguments Examples
This function is the wrapper of cross-validation for doseInt
1 2 3 4 5 6 7 | cv.doseInt(train, test = NULL, pred0 = NULL, nfolds = 5, type = "PDI",
two.sided = FALSE, family = c("continuous", "ordinal", "as.ordinal"),
method = c("rq", "svmLinear", "svmRadial", "RLT", "tree", "completeLinear",
"completeKernel"), maxiter = 20, step = 1, trace = 0, lower = TRUE,
K = 10, global = F, margin = 0, breaks = "quantile", aL = NULL,
aU = NULL, Eps = NULL, Lambda = c(2^(-(0:10)), 1e-08), Cost = c(1e-05,
0.001, 0.1, seq(1, 15, 2)), Embed.mtry = c(0.2, 0.3, 0.4, 0.5), ...)
|
train |
the training data set. |
test |
the testing data set. If test is NULL, use train as test. |
pred0 |
the initial prediction for training data set, if NULL, default initialization is used |
nfolds |
the number of folds used in cross-validation. |
type |
indicates whether PDI or EDI is to be calculated. |
two.sided |
indicator of whether two-sided interval is considered. |
family |
specifis the methods. 'continuous' leads to DC-algorithm,'ordinal' handles the ordinal treatments, while 'as.ordinal' cuts continuous treatment into several ordinal levels and apply the ordinal algorithm. |
method |
specified methods used for DC and ordinal approaches. |
maxiter |
maximal iterations for DC algorithm |
step |
stepsize for DC algorithm |
trace |
the level of detail to be printed: 1,2,3,4 |
lower |
True or False, Whether lower boundary is considered when applied to one-sided interval |
K |
level of ordinal treatment, default 10 |
global |
if global data are used for ordinal approach, default False |
margin |
how large is the margin if global=False, default 0 |
breaks |
ways 'as.ordinal' cuts continuous treatment into several ordinal levels, default 'quantile'. User can also choose 'uniform' or specify customized breaks |
Eps |
parameters for the relaxation |
Lambda |
candidate penalties for the quantile regression |
Cost |
candidate costs for the support vector machine |
Embed.mtry |
candidate proportions of mtry |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | train1=Scenario1.continuous(2000,5,1)
test1=Scenario1.continuous(10000,5,1)
cv1=cv.doseInt(train1,test1,pred0=NULL,nfolds=2,alpha=c(0.5,0.5),type='PDI',two.sided=FALSE,
family='continuous',
method='svmLinear',
maxiter=20,step=1,trace=0,lower=TRUE,Lambda = 2^(-(1:5)),Cost=c(1,7,12,19))
pred1=predict(cv1$fit,test1)
train2=Scenario2.continuous(2000,6,2)
test2=Scenario2.continuous(10000,6,2)
cv2=cv.doseInt(train2,test2,pred0=NULL,nfolds=2,alpha=c(0.5,0.5),type='PDI',two.sided=FALSE,
family='as.ordinal',
method='svmLinear',K=20,
maxiter=2,step=1,trace=3,lower=TRUE,Lambda = 2^(-(1:5)),Cost=c(0.0001,0.001,0.01,0.01,0.05,0.1,0.5,1))
pred2=predict(cv2$fit,test2)
train4=Scenario4.continuous(2000,5,4)
test4=Scenario4.continuous(10000,5,4)
cv4=cv.doseInt(train4,test4,pred0=NULL,nfolds=2,alpha=c(0.5,0.5),type='PDI',two.sided=TRUE,
family='as.ordinal',
method='svmLinear',K=20,
maxiter=2,step=1,trace=3,lower=TRUE,Lambda = 2^(-(1:5)),Cost=c(0.0001,0.001,0.01,0.01,0.05,0.1,0.5,1))
pred4=predict(cv4$fit,test4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.