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

Description Usage Arguments Details Value Examples

View source: R/feature.selected.R

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

1

Arguments

tree

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

Details

The outputs show important features for predicting survival outcomes.

Value

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

Examples

1
2
3
4
5
6
7
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)

uni.survival.tree documentation built on March 22, 2021, 9:05 a.m.