search for: classlabel

Displaying 7 results from an estimated 7 matches for "classlabel".

Did you mean: classlabels
2004 May 05
1
Segfault from knn.cv in class package (PR#6856)
The function knn.cv in the class package doesn't have error checking to ensure that the length of the classlabel argument is equal to the number of rows in the test set. If the classlabel is short, the result is often a segfault. > library(class) > dat <- matrix(rnorm(1000), nrow=10) > cl <- c(rep(1,5), rep(2,5)) > cl2 <- c(rep(1,5), rep(2,4)) > knn.cv(dat, cl) [1] 2 2 1 2 1 2 2 2 2...
2003 Jul 22
6
variable names
...is doesn't happen in my case. Every iteration in the loop has a different dataset with several variables (ex. 38 or more) and so I can't type the names by hand every time. Is there any function that generates names for variables in a dataframe. If so, how can I use then the argument rpart(classlabels~. ,.....) thanks
2012 Mar 15
1
substituting own test statistics in a built-in function
Hi All I would like to compute the raw p-value from permutation tests and I found mt.sample.rawp() from the package multtest almost similar to what I want to do. But in the function definition: mt.sample.rawp(V,classlabel,test="t",side="abs",fixed.seed.sampling="y",B=10000,na=.mt.naNUM,nonpara="n") I would like to choose my own t-test which is designed using my model parameters, so it is like a modification of t-test. I would like to use this t-test instead of the ones in t...
2011 Jul 06
1
Create simulated data's using mvrnorm
Hi All This might be something very trivial but I seem to miss something in the syntax or logic which makes me keep wandering around the problem without arriving at a solution. What I want to do is to simulate a sample data for performing cluster analysis. I tried to use x1= mvrnorm(10,rep(0.8,3),diag(3)) x2= mvrnorm(10,rep(0,3),diag(3)) x3= mvrnorm(10,rep(-0.5,3),diag(3)) x=rbind(x1,x2,x3)
2012 Jul 13
1
ROC curves with ROCR
Hi, I don't really understand how ROCR works. Here's another example with a randomforest model: I have the training dataset(bank_training) and testing dataset(bank_testing) and I ran a randomForest as below: bankrf<-randomForest(y~., bank_training, mtry=4, ntree=2, keep.forest=TRUE,importance=TRUE) bankrf.pred<-predict(bankrf, bank_testing)
2007 Mar 28
2
error when running ocfs2console (ImportError: No module named ocfs2interface.about)
I had build ocfs2-tools-1.2.3 from sources on x86_64 machine (FC6). When I run: ocfs2console I get: Traceback (most recent call last): File "/usr/local/sbin/ocfs2console", line 3, in ? from ocfs2interface.about import process_args ImportError: No module named ocfs2interface.about When I try: locate ocfs2interface.about I get no result. Any ideas what went wrong ? Regards, Andy
2005 Mar 15
4
How to extract x rows to get x pvalues using t.test
Hi all, My data genes [,1] [,2] [,3] [,4] [1,] 25 72 23 55 [2,] 34 53 41 33 [3,] 26 43 26 44 [4,] 36 64 64 22 [5,] 47 72 67 34 stu<-t.test(genes[,1:2],genes[,3:4]) > stu$p.value [1] 0.4198002 i get 1 pvalue for the entire col1:col2 Vs col3:col4. I am trying to get 5 p values for the 5 rows i have. I am trying to avoid a for loop coz my