Entering edit mode
Yukti Choudhury
▴
10
@yukti-choudhury-5924
Last seen 10.2 years ago
I am running 'superpc' to model a supervised principal component
predictor
to predict survival.
My dataset has 18 features and 218 samples. After running
superpc.predict.red to form the reduced model, I am trying to extract
feature weights that are used to construct the reduced predictor.
According to documentation for 'superpc', "wt" corresponding to
"Weight for
each feature, in constructing the reduced predictor" is one of the
values
of the output list from superpc.predict.red. However, after running
superpc.predict.red, I do not find this value in the output.
The same is true when I run the example script provided in the
documentation, as below:
set.seed(332)
#generate some data
x<-matrix(rnorm(1000*40),ncol=40)
y<-10+svd(x[1:60,])$v[,1]+ .1*rnorm(40)
ytest<-10+svd(x[1:60,])$v[,1]+ .1*rnorm(40)
censoring.status<- sample(c(rep(1,30),rep(0,10)))
censoring.status.test<- sample(c(rep(1,30),rep(0,10)))
featurenames <- paste("feature",as.character(1:1000),sep="")
data<-list(x=x,y=y, censoring.status=censoring.status,
featurenames=featurenames)
data.test<-list(x=x,y=ytest, censoring.status=censoring.status.test,
featurenames= featurenames)
a<- superpc.train(data, type="survival")
fit<- superpc.predict(a, data, data.test, threshold=1.0,
n.components=1,
prediction.type="continuous")
fit.red<- superpc.predict.red(a,data, data.test, threshold=.6)
fit.red does not include a value called "wt".
I am trying to derive a formula based on the weights of selected
features
which will to assign a supervised principal components score, with
which
survival outcome can be determined.
Any advice on the use of this function will be much appreciated.
Yukti Choudhury
Postdoctoral Fellow
Institute of Bioengineering and Nanotechnology, A*STAR,
Singapore
[[alternative HTML version deleted]]