search for: changbin

Displaying 20 results from an estimated 72 matches for "changbin".

2010 Apr 06
2
help output figures in R
somfunc<- function (file) { aa_som<-scale(file) final.som<-som(data=aa_som, rlen=10000, grid=somgrid(5,4, "hexagonal")) pdf(file="/home/cdu/changbin/file.pdf") #output graphic file. plot(final.som, main="Unsupervised SOM") dev.off() } I have many different files, if I want output pdf file with the same name as for each dataset I feed to the function somfunc. HOw should I DO? THANKS! -- Sincerely, Changbin -- Changbin Du...
2010 May 05
3
sort the data set by one variable
...639006028 0.31732711 38 637585227 0.31272531 35 637399473 0.10687524 HI, Dear R community, I am sorting the data set bo.id.pred by variable predict, why it does not work? The sequence changed compared with original data set, but you can not read any descending pattern. Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 May 18
2
get the row sums
..., sum=apply(en.id.pr[,2:4], 1, sum)) # get the row sum for three variables. Error in FUN(newX[, i], ...) : invalid 'type' (character) of argument HI, Dear R community, I am try use the above codes to get the row sums, but it gave me errors. CAN someone help me with this? -- Sincerely, Changbin -- Changbin Du DOE Joint Genome Institute Bldg 400 Rm 457 2800 Mitchell Dr Walnut Creet, CA 94598 Phone: 925-927-2856 [[alternative HTML version deleted]]
2010 May 05
2
probabilities in svm output in e1071 package
...ty, IN my data, the out variable is the target variable (0, and 1), hh is the new data set does not contain the out variable. I trained the model svm.fit in training data. And want to predict the out in the new data set hh. WHy the probabilities are both 0 in 1 and 0 class? -- Sincerely, Changbin -- Changbin Du DOE Joint Genome Institute Bldg 400 Rm 457 2800 Mitchell Dr Walnut Creet, CA 94598 Phone: 925-927-2856 [[alternative HTML version deleted]]
2010 Apr 26
3
R.GBM package
HI, Dear Greg, I AM A NEW to GBM package. Can boosting decision tree be implemented in 'gbm' package? Or 'gbm' can only be used for regression? IF can, DO I need to combine the rpart and gbm command? Thanks so much! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Apr 29
2
can not print probabilities in svm of e1071
...ULL HI, Dear David and R community, I am trying to print out the probabilities and set a threshold for make ROC curve. I dont know why it showed NULL for the probabilities. y<-train$out, is consisting of 0 and 1 binary values. Can you help me with this? Thanks so much! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Oct 25
1
help with adding lines to current plot
...oom on the right for an axis par(mar=c(5, 4, 4, 8) + 0.1) # plot x vs. y plot(x, y,type="b", pch=21, col="red", yaxt="n", lty=3, xlab="", ylab="") # add x vs. fp lines(x, z, type="b", pch=22, col="blue", lty=2) -- Sincerely, Changbin -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 May 25
4
R eat my data
...but when I read into R, it changed to 1068 lines, how comes? cdu@nuuk:~/operon$ wc -l id_name_gh5.txt 1932 id_name_gh5.txt > gene_name<-read.table("/home/cdu/operon/id_name_gh5.txt", sep="\t", skip=0, header=F, fill=T) > dim(gene_name) [1] 1068 3 -- Sincerely, Changbin -- Changbin Du DOE Joint Genome Institute Bldg 400 Rm 457 2800 Mitchell Dr Walnut Creet, CA 94598 Phone: 925-927-2856 [[alternative HTML version deleted]]
2010 Nov 04
4
how to work with long vectors
...coverage. + cover_per<-function (data) { + output<-numeric(0) + for (i in data) { + x<-(100*sum(ifelse(data >= i, 1, 0))/length(data)) + output<-c(output, x) + } + return(output) + } result<-cover_per(cover) Thanks so much! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Apr 15
2
r-loop
...(0.1, 0.9, by=0.1)) { cat('xweight ', x, '\n') lossw[i] <- cross.validation(file, x)$avg } return(lossw) } MY question is how to index the lossw[i]? for (i in 1:9) for (x in seq(0.1, 0.9, by=0.1)) Thanks so much! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Jun 15
1
output from the gbm package
...ng should be f(x), from it , how to calculate the probability for each observations in data set? SInce it is stochastic, how can guarantee that each observation in training data are selected at least once? IF SOME obs are not selected, how to calculate the training error? Thanks? -- Sincerely, Changbin -- Changbin Du DOE Joint Genome Institute Bldg 400 Rm 457 2800 Mitchell Dr Walnut Creet, CA 94598 Phone: 925-927-2856 [[alternative HTML version deleted]]
2010 Dec 16
1
my function does not work for large data set
...est)) > dim(dimer.nn) [1] 999554 2402 > dimer.nn[varname[2:2401]]<- apply(as.matrix(dimer.nn[varname[2:2401]]), 2, function (x) imper(x, dimer.nn)) * Error in unlist(X, recursive = FALSE, use.names = FALSE) : negative length vectors are not allowed* Thanks so much! -- Sincerely, Changbin -- Changbin Du DOE Joint Genome Institute Bldg 400 Rm 457 2800 Mitchell Dr Walnut Creet, CA 94598 Phone: 925-927-2856 [[alternative HTML version deleted]]
2011 Sep 01
3
how to split a data frame by two variables
...45 e 2 I tried the following: xs = split(x,x$g*x$let) *Warning message: In Ops.factor(x$g, x$let) : * not meaningful for factors* xs = split(x,c(x$g*x$let)) *Warning message: In Ops.factor(x$g, x$let) : * not meaningful for factors * Can someone give some hints? Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Nov 01
2
how to save this result in a vector
...a vector, How to do this? test<-seq(10, 342, by=2) #cover is a vector cover_per<-function (cover) { for (i in min(cover):max(cover)) {print(100*sum(ifelse(cover >= i, 1, 0))/length(cover))} } result<-cover_per(test) > result NULL Can anyone help me this this? -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Jun 19
1
question about boosting(Adaboosting. M1)
HI, Guys, I am trying to use the AdaBoosting. M.1 algorithm to integrate three models. I found the sum of weights for each model is not equal to one. How to deal with this? Thanks, any response or suggestions are appreciated! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Apr 21
2
?rpart
...st friday, I used the codes, it works, but today, it does not run? > fit.dimer <- rpart(outcome ~., method="class", data=p.df) Error in `[.data.frame`(frame, predictors) : undefined columns selected DOEs anyone have comments or suggestions? Thanks in advance! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 May 19
1
col allocation is not right
...6, add=T) plot(en.auc, col=9,lty="dotted",lwd=3, add=T) Hi, Dear community, I am use the above codes to draw plot, but find that col =9 is not used by the R. Instead, it use the col=2 when plot en.auc. WHy this happens and how to check the col allocation in R? Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Sep 24
1
How to read this file into R.
...r=F, strip.white=TRUE, nrows=1) Warning message: In read.table("/home/cdu/operon/carbonic/ca_boost_feature.txt", : incomplete final line found by readTableHeader on '/home/cdu/operon/carbonic/ca_boost_feature.txt' I attached this file with this email. Thanks! -- Sincerely, Changbin -- -------------- next part -------------- Feature selection (Boosting:0.0025,5)! H.2.C C.1.D C.3.R E.0.N C.2.S C.0.G H.3.G
2010 Oct 12
1
need help with nnet
...ain) [1] 1827 2409 nnet.fit<-nnet(as.factor(out) ~ ., data=train, size=3, rang=0.3, decay=5e-4, maxit=500) # model fitting *Error in nnet.default(x, y, w, entropy = TRUE, ...) : too many (7231) weights* The data set is bigger than 25MB, can not be attached. Many thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2011 Feb 24
2
create dummy variables by for loop
...: ack$id_1 <- (ack$ID==1)*1 ack$id_2 <- (ack$ID==2)*1 .. . ack$id_100 <- (ack$ID==100)*1 I used the following codes: for(i in 1:100){ ack$id_[i] <- (ack$ID==i)*1 } But only one column is created, can anyone help me? Thanks a lot! -- Sincerely, Changbin -- [[alternative HTML version deleted]]