Learn R Programming

uni.survival.tree (version 1.5)

feature.selected: The names of features that are selected in a tree

Description

The function returns the names of features (covariates) that are selected as the internal nodes of a tree. Only the names of the covariates are shown by excluding the cutt-off values.

Usage

feature.selected(tree)

Arguments

tree

:an object made from the "uni.tree" function

Value

An array of characters that are the names from those covariates selected in the tree

Details

The outputs show important features for predicting survival outcomes.

Examples

Run this code
# NOT RUN {
data(Lung,package="compound.Cox")
train_Lung=Lung[which(Lung[,"train"]==TRUE),] #select training data
t.vec=train_Lung[,1]
d.vec=train_Lung[,2]
x.mat=train_Lung[,-c(1,2,3)]
res=uni.tree(t.vec,d.vec,x.mat,P.value=0.01,d0=0.01,S.plot=FALSE,score=TRUE)
feature.selected(res)
# }

Run the code above in your browser using DataLab