similar to: predict() question

Displaying 20 results from an estimated 20000 matches similar to: "predict() question"

2005 Jan 25
0
Collapsing solution to the question discussed above: Re: multi-class classification using rpart
You could break your 3 class problem into several (2 or 3) 2 class problems, and then use Andy's suggestion (see the CART book). There are several ways to break the problem into 2 class problems, and several ways to combine the resulting classifiers. Tom Dietterich, Jerry Friedman, Trevor Hastie and Rob Tibshirani, among others, have articles on the question, in places like Annals of
2005 Jan 27
0
how to evaluate the significance of attributes in tree gr owing
FWIW, I wrote a little function to extract variable importance as defined in the CART book a while ago. It's rather limited: Only works for regression problem, and you need to set maxsurrogate=0 and maxcompete=0. It may (or may not) help you: varimp.rpart <- function(x) { dev <- x$frame[, c("var", "dev")] dev <- dev[dev$var != "<leaf>",
2005 Jan 06
1
multiple trees
Hi, there: I made a function to do k-fold cross-validation as below. Basically whenever I call cv(test) for example, an error message like: 20Fold 1 Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ please help. My test dataset has 142 variables, the last one is a categorical response variable. also, i am not sure how to save
2011 Oct 24
1
heatmap for plotting categorical matrix
Hi there, I have a matrix like this: > a4[1:20, 1:5] 194 211 294 314 315 GO:0000003 1 1 1 1 1 GO:0000072 0 0 0 0 0 GO:0000076 1 0 0 0 0 GO:0000082 1 3 1 1 1 GO:0000083 1 0 0 0 1 GO:0000086 0 1 0 1 1 GO:0000114 0 0 0 0 0 GO:0000115 0 0 0 0 0 GO:0000117 0 0 0 0 0 GO:0000160 0 0 1 0 0
2006 Dec 12
0
Re : Re : implementation of t.test
Excuses I have a mistake in previous mail Type stats:::t.test.defaultThe formal way is to use getAnywhere(t.test) Justin BEM Elève Ingénieur Statisticien Economiste BP 294 Yaoundé. Tél (00237)9597295. ----- Message d'origine ---- De : justin bem <justin_bem@yahoo.fr> À : Weiwei Shi <helprhelp@gmail.com> Cc : R-help@stat.math.ethz.ch Envoyé le : Mardi, 12 Décembre 2006,
2005 Jul 07
2
randomForest
> From: Weiwei Shi > > it works. > thanks, > > but: (just curious) > why i tried previously and i got > > > is.vector(sample.size) > [1] TRUE Because a list is also a vector: > a <- c(list(1), list(2)) > a [[1]] [1] 1 [[2]] [1] 2 > is.vector(a) [1] TRUE > is.numeric(a) [1] FALSE Actually, the way I initialize a list of known length is by
2011 May 27
4
network package in R
Hi there, I need a network builder and it can change the node size and color; I am not sure if network package in R can do this or not. The other functions I wanted have been found in that package. BTW, if there is another package in R relating to this, please suggest too. Thanks, Weiwei -- Weiwei Shi, Ph.D Research Scientist "Did you always know?" "No, I did not. But I
2009 Jul 13
2
how to keep row name if there is only one row selected from a data frame
Hi, there: Assume I have a dataframe with rownames like A with rownames like a to e, > A [,1] [,2] a 1 6 b 2 7 c 3 8 d 4 9 e 5 10 when I use A[1,], I lost the rowname for it, like below. How could I keep it? Is there an easy way instead that I have to modify by myself after I used A[1,] manually. > A[1,] [1] 1 6 Thanks, W. -- Weiwei Shi, Ph.D Research
2007 Oct 29
3
how to split data.frame by row?
hi, if I have 20 x 3 data.frame, how to split it into 10 x 6 (moving the lower part of 10x3 to column) or 5 x 12 thanks -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
2007 Apr 11
5
how to reverse a list
Hi, there: I am wondering if there is a quick way to "reverse" a list like this: t0 <- list(a=1, b=1, c=2, d=1) reverst t0 to t1 > t1 $`1` [1] "a" "b" "d" $`2` [1] "c" thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
2006 Jan 09
0
Looking for packages to do Feature Selection and Classifi cation
Hi, You should also check my msc.features.select from caMassClass package. It has feature selection algorithm that I found useful in case of mass-spectra data. It performs individual feature selection and/or removes highly correlated neighbor features. Jarek -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] Sent: Friday, January
2005 Jul 13
1
read.table
Hi, I have a question on read.table. I have a dataset with 273,000 lines and 195 columns. I used the read.table to load the data into R: trn<-read.table('train1.dat', header=F, sep='|', na.strings='.') I found it takes forever. then I run 1/10 of the data (test) using read.table again. And this time it finished quickly. So, there might be something wrong in my data
2005 Oct 11
1
a problem in random forest
Hi, there: I spent some time on this but I think I really cannot figure it out, maybe I missed something here: my data looks like this: > dim(trn3) [1] 7361 209 > dim(val3) [1] 7427 209 > mg.rf2<-randomForest(x=trn3[,1:208], y=trn3[,209], data=trn3, xtest=val3[, 1:208], ytest=val3[,209], importance=T) my test data has 7427 observations but after prediction, > dim(mg.rf2$votes)
2005 Oct 04
1
generalized linear model and missing handling
Hi, I have a dataset and want to build a generalized linear model on it. Unfortunately, complete.cases(df) returns null, which means I have to find a way to "fill" those missings. One way is following my previous post to use median to replace(or use most freq. of level to replace for catergorical case), but I am wondering if there are other ways, when glm or something like it is
2007 Jun 25
3
a string to enviroment or function
Hi, I am wondering how to make a function Fun to make the following work: t0 <- (paste("hgu133a", "ENTREZID", sep="")) xx <- as.list(Fun(t0)) # make it work like xx<-as.list(hgu133aENTREZID) thanks, -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
2007 Apr 24
5
intersect more than two sets
Hi, I searched the archives and did not find a good solution to that. assume I have 10 sets and I want to have the common character elements of them. how could i do that? -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
2006 Oct 17
4
cluster in R
hi, is there some good summary on clustering methods in R? It seems there are many packages involving it. And I have two questions on clustering here: 1. Is there a way of evaluate the effecitives (or seperation) of clustering (rather than by visualization)? 2. Is there a search method (like genetic search) which can help find the best subset of attributes which gives best seperation? Thanks,
2005 Jan 25
3
multi-class classification using rpart
Hi, I am trying to make a multi-class classification tree by using rpart. I used MASS package'd data: fgl to test and it works well. However, when I used my small-sampled data as below, the program seems to take forever. I am not sure if it is due to slowness or there is something wrong with my codes or data manipulation. Please be advised ! The data is described as the output from str()
2005 Jul 08
1
"more" and "tab" functionalities in R under linux
Hi, forgive me if it is due to my "laziness" :) I am wondering if there are functionalities in R, which can do like "more" and "tab" in linux: more(one.data.frame) so I can browse through it. Sometimes I can use one.data.frame[1:100,], but still not as good as "more" in linux. tab: can I use tab to auto complete an defined object name in R so I don't
2008 Aug 24
2
similarity between two gene lists with varied length
Dear listers, a little off-topic: I am looking for and compare algorithms which can calculate "distance" or "similarity" between two gene lists with different lengths. Any paper, any implementation in R and any suggestion is welcome! Thanks, -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..."