Fwd: feature weights in 'superpc' package
1
0
Entering edit mode
@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]]
Survival ASSIGN Survival ASSIGN • 1.9k views
ADD COMMENT
0
Entering edit mode
Tim Triche ★ 4.2k
@tim-triche-3561
Last seen 4.2 years ago
United States
why did you not at least cc: the maintainer of the package (Robert Tibshirani) on your email? The odds are quite good that he will understand your query much better than those of us who are merely users of the methodology, as he and Eric Bair developed it. Cc:'ing Dr. Tibshirani re: weights in superpc. Best, --t On Mon, May 6, 2013 at 2:28 AM, Yukti Choudhury <yukti.c@gmail.com> wrote: > 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]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- *A model is a lie that helps you see the truth.* * * Howard Skipper<http: cancerres.aacrjournals.org="" content="" 31="" 9="" 1173.full.pdf=""> [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 591 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6