preplotperf: Preprocess a 'ksvm' object

Description Usage Arguments Details Value Author(s) References See Also

View source: R/svm_code.R


Performs necessary preprocessing of a ksvm object when the plots should be generated based on all training data and not only on the support vectors.


preplotperf(model, mydata, indy, mytestdata, zerolevel = "zero",
  risklabel = "Estimated risk", adverse = FALSE)



Object of class ksvm


Data on which mymodel was trained on.


Column number of the outcome in mydata.


Data on which to evaluate mymodel. (Optional)


The value of the contributions that should be put to zero. If "zero", the contributions are represented as they are. If "min", for each predictor or set of predictors contributing to an interaction, the minimal observed value of the contribution in the training data is substracted from the contribution to ensure that the contribution is always positive. If "median" or "mean", the median or mean value is substracted from the contributions, respectively (default="zero"). See below for more details.


A character string representing the label for the represented risk. For multinomial logistic regression models, a vector of risk labels should be provided. See the examples for an illustration of the approach.


A logical indicating whether the score and risk range in the adverse direction (default=FALSE, i.e. high score corresponds to a high risk).


Depending on the value of zerolevel, the visualized contributions are slightly different. If zerolevel="zero", the contribution for variable x^p is β_pf_p(x^p), with β_p the model coefficient corresponding to this predictor and f_p(x^p) a (possible) transformation of x^p. If zerolevel is "min", "median" or "mean", a value equal to the minimum, median and mean of the contribution β_pf_p(x^p) in the training data, respectively, is substracted from the contribution. See the references for more information.


List object


Vanya Van Belle


Van Belle V., Van Calster B., Suykens J.A.K., Van Huffel S. and Lisboa P., Explaining support vector machines: a color based nomogram, Internal Report 16-27, ESAT-Stadius, KU Leuven (Leuven, Belgium), 2016

See Also

colplot, cchart, ccchart

VRPM documentation built on July 11, 2017, 5:01 p.m.

Related to preplotperf in VRPM...