similar to: Error running lda example: Session Info

Displaying 20 results from an estimated 200 matches similar to: "Error running lda example: Session Info"

2009 Nov 15
3
Error running lda example from Help File (MASS library )
Hello all, I'm trying to run lda() from the MASS library but the Help example generates the following error: #Code from example in lda Help file # Resulting Error >Error in if (targetlist[i] == stringname) { : argument is of length zero My Current R Installation: MacOSX: 10.5.8 R: 2.10.0 -- Gregory Riddick, PhD. CRTA Research Fellow National Institutes of Health National
2004 Jan 09
3
ipred and lda
Dear all, can anybody help me with the program below? The function predict.lda seems to be defined but cannot be used by errortest. The R version is 1.7.1 Thanks in advance, Stefan ---------------- library("MASS"); library("ipred"); data(iris3); tr <- sample(1:50, 25); train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]); test <- rbind(iris3[-tr,,1],
2002 Mar 17
3
apply problem
> data(iris) # iris3 is first 3 rows of iris > iris3 <- iris[1:3,] # z compares row 1 to each row of iris3 and is correctly computed > z <- c(F,F,F) > for(i in seq(z)) z[i] <- identical(iris3[1,],iris3[i,]) > z [1] TRUE FALSE FALSE # this should do the same but is incorrect > apply(iris3,1,function(x)identical(x,iris3[1,])) 1 2 3 FALSE FALSE FALSE
2000 Mar 08
3
Reading data for discriminant analysis
Dear R users, I want to do discriminant analysis on my data. I have successfully followed the discriminant analysis in V & R on the iris data: > ir <- rbind (iris3[,,1],iris3[,,2],iris3[,,3]) > ir.species <- c(rep("s",50),rep("c",50),rep("v",50)) > a <- lda(log(ir),ir.species) > a$svd^2/sum(a$svd^2) [1] 0.996498601 0.003501399 > a.x <-
2004 Nov 02
2
lda
Hi !! I am trying to analyze some of my data using linear discriminant analysis. I worked out the following example code in Venables and Ripley It does not seem to be happy with it. ============================ library(MASS) library(stats) data(iris3) ir<-rbind(iris3[,,1],iris3[,,2],iris3[,,3]) ir.species<-factor(c(rep("s",50),rep("c",50),rep("v",50)))
2009 Nov 02
1
modifying predict.nnet() to function with errorest()
Greetings, I am having trouble calculating artificial neural network misclassification errors using errorest() from the ipred package. I have had no problems estimating the values with randomForest() or svm(), but can't seem to get it to work with nnet(). I believe this is due to the output of the predict.nnet() function within cv.factor(). Below is a quick example of the problem I'm
2005 Jul 27
1
how to get actual value from predict in nnet?
Dear All, After followed the help of nnet, I could get the networks trained and, excitedly, get the prediction for other samples. It is a two classes data set, I used "N" and "P" to label the two. My question is, how do I get the predicted numerical value for each sample? Not just give me the label(either "N" or "P")? Thanks! FYI: The nnet example I
2006 Apr 13
5
Questions on formula in princomp
I hope this time I'm using the "iris" dataset correctly: ir <- rbind(iris3[,,1], iris3[,,2], iris3[,,3]) lir <- data.frame(log(ir)) names(lir) <- c("a","b","c","d") I'm trying to understand the meaning of expressions like "~ a+b+c+d", used with princomp, e.g. princomp(~ a+b+c+d, data=lir, cor=T) By inspection, it
2007 Apr 19
1
Do you have any idea what could be the problem with this script?
Hello all, If I run this script, and observe the output, the results are not there at all (try to do the same in the browser). Any suggestions? require ''rubygems'' require ''mechanize'' agent = WWW::Mechanize.new agent.user_agent_alias = ''Mac Safari'' page =
2007 Apr 20
2
Running script does not return the correct page
Hello all, I have tried to post this yesterday, but noticed I was actually not subscribed yet... Well, here we go again: If I run this script, and observe the output, the results are not there at all (try to do the same in the browser). Any suggestions? require ''rubygems'' require ''mechanize'' agent = WWW::Mechanize.new agent.user_agent_alias =
2004 Mar 29
1
Interpreting knn Results
Maybe you should show your colleague how to access help pages in R? Right in ?knn, it says: prob: If this is true, the proportion of the votes for the winning class are returned as attribute 'prob'. so 1.0 mean all three NNs are of the `winning'; i.e., predicted, class, and 0.66667 means 2 out of the 3 NNs are of the winning class, etc. Andy > From: Ko-Kang
2007 Apr 20
3
Hi
Please add me to mailing list. regards Astha ************************************** See what's free at http://www.aol.com. [[alternative HTML version deleted]]
2006 Apr 13
3
What does "rbind(iris[,,1], iris[,,2], iris[,,3])" do?
It's in the Venables & Ripley MASS (ed 3) book in the section on principal components. The context is as follows > ir <- rbind(iris[,,1], iris[,,2], iris[,,3]) > ir.species <- factor(c(rep("s",50),rep("c",50),rep("v",50))) (then they use brush(ir) which I guess is not an R function) and then > princomp(log(ir[1:4]),cor=T) (there is no [1:4]
2009 May 30
0
what is 'class.ind' here?
Hi. The there is an example in nnet help which is pasted in below. I am not sure how they are generating 'targets'. What is the 'class.ind() function doing? In the help docs for it they say "Generates a class indicator function from a given factor." I tried putting a simple vector of the "classes" into test.cl (below) but I get an error of "(list) object
2013 May 20
0
Neural network: Amore adaptative vs batch why the results are so different?
I am using the iris example came with nnet package to test AMORE. I can see the outcomes are similar to nnet with adaptative gradient descent. However, when I changed the method in the newff to the batch gradient descent, even by setting the epoch numbers very large, I still found all the iris expected class=2 being classified as class=3. In addition, all those records in the outcomes (y) are the
2006 May 30
1
when dimensionality is larger than the number of observations?
Hi, there: Can anyone here kindly point some good reference or links on this topic? Esp. some solutions from BioConductor or R, when dealing with microarray-like, "fat" data? thanks, -- Weiwei Shi, Ph.D "Did you always know?" "No, I did not. But I believed..." ---Matrix III [[alternative HTML version deleted]]
2009 Oct 14
1
plot discriminant analysis
I'm confused on how is the right way to plot a discriminant analysis made by lda function (MASS package). (I had attached my data fro reproduction). When I plot a lda object : X <- read.table("data", header=T) lda_analysis <- lda(formula(X), data=X) plot(lda_analysis) #the above plot is completely different to: plot(predict(lda_analysis)$x,
2011 Jun 14
1
color specific(!) lines in different color with in parcoord plots
Dear Madame or Sir, in my current project, I have so far used a lot of very different plots. I am now trying to gain informatin with the help of parallel coordinate plots. Therefore, I use the function "parcoord" of the MASS package. What I would like to do, is to color let's say the points according to the first half of rows of a specific matrix/dataframe in a color different from
2011 Dec 08
1
lda output missing
Hello everyone, I am working on a linear discriminant analysis and am having issues finding the full output of my lda. Specifically, there is no reporting of the Proportion of Trace that is a normal output of the procedure. I'm using a csv file and everything is reading in correctly. I've looked and looked and can't figure out why my output is not complete. Is it something simple that
2008 Dec 31
1
Problem with package SNOW on MacOS X 10.5.5
Hello All, I can run the "lower level" functions OK, but many of the higher level (eg. parSApply) functions are generating errors. When running the example (from the snow help docs) for parApply on MacOSX 10.5.5, I get the following error: cl <- makeSOCKcluster(c("localhost","localhost")) sum(parApply(cl, matrix(1:100,10), 1, sum)) Error in