tsp.tree {BigTSP} | R Documentation |
Fit a Classification Tree based on Top Scoring Pairs.
tsp.tree(X, response, control = tree.control(dim(X)[1], ...), method = "recursive.partition", split = c("deviance", "gini"), x = FALSE, y = TRUE, wts = TRUE, ...)
X |
input matrix, of dimension nobs x nvars, each row is an observation vector. |
response |
response variable. |
control |
A list as returned by |
method |
character string giving the method to use. The only other useful value is |
split |
Splitting criterion to use. |
x |
logical. If true, the matrix of variables for each case is returned. |
y |
logical. If true, the response variable is returned. |
wts |
logical. If true, the weights are returned. |
... |
Additional arguments |
frame |
A data frame with a row for each node, and row.names giving the node numbers. The columns include var, the variable used at the split (or |
where |
An integer vector giving the row number of the frame detailing the node to which each case is assigned. |
terms |
The terms of the formula. |
call |
The matched call to Tree. |
model |
If |
x |
If |
y |
If |
wts |
If |
Xiaolin Yang, Han Liu
Czajkowski,M., Kretowski, M. (2011) Top scoring pair decision tree for gene expression data analysis. Advances in experimental medicine and biology
Breiman L., Friedman J. H., Olshen R. A., and Stone, C. J. (1984) Classification and Regression Trees. Wadsworth.
Ripley, B. D. (1996) Pattern Recognition and Neural Networks. Cambridge University Press, Cambridge. Chapter 7.
library(tree) x=matrix(rnorm(100*20),100,20) y=rbinom(100,1,0.5) y=as.factor(y) data=data.frame(y,x) tr=tsp.tree(x,y) predict(tr,data[1:10,]) plot(tr) text(tr)