similar to: Erratic behaviour of sammon()

Displaying 20 results from an estimated 1000 matches similar to: "Erratic behaviour of sammon()"

2006 Jan 30
1
Varying results of sammon(), for the same data set
Hello, I have a data set on which I run the sammon algorithm as follows: library(MASS) data = read.table('problemforr.dat') y = cmdscale(data, add=TRUE) s = sammon(data, y$points) (In case it should be relevant, I make the data available at http://idi.ntnu.no/~edsberg/problemforr.dat) With R 2.2.1 on Debian Sid I always get one of two solutions (stress 1.74288 after 10 iterations or
2004 Jun 14
1
error running sammon
Hello, I am inputing a 17 x 17 symetric matrix to sammon. The matrix is a co-occurance matrix with no missing data. If this is at all relevant, running hclust on this matrix works. > samx <- sammon(q23axproduct) I receive the following error: Error in sammon(q23axproduct) : initial configuration must be complete In addition: Warning messages: 1: some of the first 2 eigenvalues are
2005 Apr 20
4
results from sammon()
Dear all, I'm trying to get a two dimensional embedding of some data using different meythods, among which princomp(), cmds(), sammon() and isoMDS(). I have a problem with sammon() because the coordinates I get are all equal to NA. What does it mean? Why the method fails in finding the coordinates? Can I do anything to get some meaningful results? Thank you very much Domenico
2002 Jul 30
3
Error running sammon() in multiv package
When I try to run the "sammon" function of the multiv package, I always get this error message: Error in as.vector(dist(a)) : couldn't find function "dist" It happens even with example(sammon). I am running R 1.5.0 on Win98 and I have still installed R 1.4.1 but it doesn't work on the old R version with the older multiv package either. Is there a problem with the
2007 Aug 23
0
indexing and regression testing
Dear all, It was a pleasure to meet you at Iowa State University. Two days ago I submitted two experimental packages to CRAN (hope it will be there soon): rindex: quick indexing of large objects (currently only character, see ?index) regtest: some first support for automated regression testing (heavily used in \dontshow{} section of ?index) With rindex you can for example i <-
2024 Jun 16
1
slowness when I use a list comprehension
This can be vectorized. Try ix <- seq_along(vec2) S_diff2 <- sapply(seq_len(N1-(N2-1)*ratio_sampling), \(j) sum((vec1[(ix-1)*ratio_sampling+j] - vec2[ix])**2)) On Sun, Jun 16, 2024 at 11:27?AM Laurent Rhelp <laurentRHelp at free.fr> wrote: > > Dear RHelp-list, > > I try to use the package comprehenr to replace a for loop by a list > comprehension. > > I
2001 Oct 12
1
MASS: isoMDS and sammon
If tbl is an object of class 'dist', you can do this: a <- sammon(tbl, k=3) But you can't do this: b <- isoMDS(tbl, k=3) Wouldn't it be sensible to have identical interfaces to sammon() and isoMDS() ? I think all that would be needed is to change this: isoMDS <- function(d, y=cmdscale(d, 2), maxit=50, trace=TRUE) { ...into this: isoMDS <-
2009 Jul 27
1
how to use do.call together with cbind and get inside a function
Dear R-helpers: I have a question related to using do.call to call cbind and get. #the following works vec1 <- c(1,2) vec2 <- c(3,4) ColNameVec <- c('vec1','vec2') mat <- do.call("cbind",lapply(ColNameVec,get)) mat #put code above into a function then it does not work #before doing so, first remove vec1 and vec2 from global environment rm(vec1,vec2) test
2008 Dec 30
2
[LLVMdev] Folding vector instructions
Hello. Sorry I am not sure this question should go to llvm or mesa3d-dev mailing list, so I post it to both. I am writing a llvm backend for a modern graphics processor which has a ISA very similar to that of Direct 3D. I am reading the code in Gallium-3D driver in a mesa3d branch, which converts the shader programs (TGSI tokens) to LLVM IR. For the shader instruction also found in LLVM IR,
2024 Jun 16
1
slowness when I use a list comprehension
I would be more strong on this advice: learn to think in R, rather than thinking in Python, when programming in R. R has atomic vectors... Python does not (until you import a package that implements them). I find that while it is possible to import R thinking into Python, Python programmers seem to object for stylistic reasons even though such thinking speeds up Python also. A key step in that
2004 May 25
1
cor and missing values. Bug?
There seems to be an issue in computing rank correlations with missing values present. I think this comes from the way rank() function works but I am not sure how to go about this. Rank function places missing values at the end by default thus skewing the rank relationship between two vectors: Example: R : Copyright 2003, The R Foundation for Statistical Computing Version 1.8.1 (2003-11-21),
2024 Jun 16
2
slowness when I use a list comprehension
Dear RHelp-list, ?? I try to use the package comprehenr to replace a for loop by a list comprehension. ?I wrote the code but I certainly miss something because it is very slower compared to the for loops. May you please explain to me why the list comprehension is slower in my case. Here is my example. I do the calculation of the square difference between the values of two vectors vec1 and
2011 Jun 03
2
Arules: R Crashes when running eclat with tidLists=TRUE
Hello, I'm using the eclat function of the arules package (1.0-6) for the identification of frequent itemsets. I need the tidLists, but if I set in the function tidLists=TRUE R crashes (Windows XP Professional SP3, 32 bit, R version 2.12.1 (2010-12-16), reproducible on two different computers) with two different error messages or non at all. Minimum examples are: library(arules)
2024 Jun 16
1
slowness when I use a list comprehension
I fully agree with Jeff that the best way to use ANY language is to evaluate the language in terms of not just the capabilities it offers but also the philosophy behind what it was created for and how people do things and just grok it and use it mostly in the way intended. I do that with all the languages I learn, whether for computers or humans. Bringing in something you like from another
2024 Jun 16
1
slowness when I use a list comprehension
Laurent, Thank you for introducing me to a package I did not know existed as I use features like list comprehension in python all the time and could see using it in R now that I know it is available. As to why you see your example as slow, I see you used a fairly complex and nested expression and wonder if it was a better way to go. As you are dealing with an interpreter doing delayed
2008 May 12
1
lexicographic comparison of two vectors
Is there any built-in way to lexicographically compare two vectors of the same length in R? The textbook algorithm could be coded as follows: lex.cmp <- function (vec1,vec2) { for (j in 1:length(vec1)) { if (vec1[j] < vec2[j]) { return(-1) } if (vec1[j] > vec2[j]) { return(1) } } return(0) } Thanks, Gabriel
2011 Apr 14
1
nesting multiple for loops
Hi everyone. I am quite frustrated that this doesn't work, as all the functions within work fine by themselves. I'd also like any pointers to how to avoid 'for' loops in my code. I understand it's less than desirable, but I'm still quite new and use them a lot. I have a few wide datasets (90 to 120) with long column names, each name contains a number of different
2008 Dec 30
2
[LLVMdev] [Mesa3d-dev] Folding vector instructions
Alex wrote: > Hello. > > Sorry I am not sure this question should go to llvm or mesa3d-dev mailing > list, so I post it to both. > > I am writing a llvm backend for a modern graphics processor which has a ISA > very similar to that of Direct 3D. > > I am reading the code in Gallium-3D driver in a mesa3d branch, which > converts the shader programs (TGSI tokens) to
2010 Jul 12
2
findInterval and data resolution
Hello Wise Ones... I need a clever way around a problem with findInterval. Consider: vec1 <- 1:10 vec2 <- seq(1, 10, by = 0.1) x1 <- c(2:3) a1 <- findInterval(x1, vec1); a1 # example 1 a2 <- findInterval(x1, vec2); a2 # example 2 In the problem I'm working on, vec* may be either integer or numeric, like vec1 and vec2. I need to remove one or more sections of this vector;
2013 Apr 18
1
vectors with equal values
Hi, Try: ?vec1<-c(1,1,1,1,1,1,1,1,1) if(all(vec1==1)) "xxxxxxxxx" else? "yyyyyyyyyyy" #[1] "xxxxxxxxx" ?vec2<-c(rep(1,4),2) ?if(all(vec2==1)) "xxxxxxxxx" else? "yyyyyyyyyyy" #[1] "yyyyyyyyyyy" #or if(length(unique(vec1))==1) "xxxxxxxxx" else? "yyyyyyyyyyy" #[1] "xxxxxxxxx" ? if(length(unique(vec2))==1)