similar to: kmeans (again)

Displaying 20 results from an estimated 600 matches similar to: "kmeans (again)"

2003 Jun 06
1
Kmeans again
Dear helpers I'm sorry to insist but I still think there is something wrong with the function kmeans. For instance, let's try the same small example: > dados<-matrix(c(-1,0,2,2.5,7,9,0,3,0,6,1,4),6,2) I will choose observations 3 and 4 for initial centers and just one iteration. The results are > A<-kmeans(dados,dados[c(3,4),],1) > A $cluster [1] 1 1 1 1 2 2 $centers
2001 Oct 23
2
Parsing of HTML files in R
Is there any package similar to the XML package that is able to "extract" relevant information from HTML files. Namely, I'm interested in obtained data that is represented as a HTML table, into some R-type structure. Thank you. -- Luis Torgo FEP/LIACC, University of Porto Phone : (+351) 22 607 88 30 Machine Learning Group Fax : (+351) 22 600 36 54 R. Campo
2005 Apr 27
2
its package: inexplicable date-shifting ?!
Can someone please explain to me why the dates get shifted by one day when I create an its ( irregular time-series ) object from a matrix for which I've assigned row names. E.g. in the example run below, why does the its object have dates one-shifted from my original dates? > install.packages('its') > install.packages('Hmisc') > require(its) > m <-
2002 Apr 23
1
Writing text in lattice graphics
I'm trying to obtain a set of regression lines obtained for different values of a factor using lattice. I would like to add a string to each panel showing the R^2 value of the respective line, but I'm having difficulties positioning the text (namely on which coordinates to give to the "ltext" function). Here is what I'm using (I've used ?? for the things I would like
2005 Apr 27
1
Recursive calculation of a series of values
Dear R-users, I'm felling kind of blocked on a quite simple problem and I wonder if someone could give me a help with it. My problem: x[0] = 100 x[1] = (1+v[1])*x[0] x[2] = (1+v[2])*x[1] ... i.e. x[i] = (1+v[i])*x[i-1] and x[0]=k Given a set of v values I wanted to obtain the corresponding x values in an efficient way (i.e. without a for loop). For instance, if x[0] = 100 and v =
2002 Sep 12
1
DBI / MySQL problems
Hi. I frequently use RMySQL package to interface R with MySQL databases. I was having a try with package DBI and I got the following error: > library(RMySQL) > library(DBI) > drv <- dbDriver("MySQL") > ch <- dbConnect(drv, dbname="mydb", user="myuser", password="mypasswd") > ibm <- dbGetQuery(ch,"select * from table where
2003 Jun 03
1
kmeans
Dear helpers I was working with kmeans from package mva and found some strange situations. When I run several times the kmeans algorithm with the same dataset I get the same partition. I simulated a little example with 6 observations and run kmeans giving the centers and making just one iteration. I expected that the algorithm just allocated the observations to the nearest center but think this
2003 Nov 24
1
RMySQL valid field names
I'm having some problems with valid field names when using RMySQL to interface R (version 1.7.0, under RedHat9.0), to MySQL (4.1.0-alpha). I think I've spotted the problem and a solution (which is working for me), but I wanted to share this with you as I may be missing something. (Note: I'm aware that this is an old R version, but I've checked the code of the lastest version of
2002 Nov 26
1
Problem with accented characters in portuguese
Dear all, I've recently encountered a strange behaviour when using R with portuguese accented characters. The most curious aspect is that using the same code with ESS under XEmacs the behaviour is different. My system is: > R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major
2005 Oct 31
2
Sweave (R?) font encoding problems
Dear R list, I'm having some problems with font encodings when using R+Sweave+Latex in my native language: Portuguese. My environment: Kubuntu 5.10 Linux $> uname -a Linux nassa 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux R> R.version _ platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu
2013 Jan 24
1
Help regarding kmeans output. need to save the clusters into different directories/folders.
Hi Team, I am trying to run kmeans in R, and I need to save the different clusters into different folders. How can I achieve this? # this is how my data looks. $ *cat 1.tsv | head* userid bookid rating bookTotalRatings bookAvgRating userTotalRatings userAvgRating 1 100 0 24 2.7916666666666665 291 2.6735395189003435 2 200 7 24 2.9583333333333335 6 7.0
2006 Feb 02
2
R training courses
Hi All, I am interested in learning about people's experience with R training or courses. What worked, what didn't? What do you recommend? Also, if there any groups or individuals that have and can offer R training courses, please contact me directly. I would like to learn about your services. Thanks for your input and help. Please feel free to contact me directly. Russ
2003 Apr 14
2
kmeans clustering
Hi, I am using kmeans to cluster a dataset. I test this example: > data<-matrix(scan("data100.txt"),100,37,byrow=T) (my dataset is 100 rows and 37 columns--clustering rows) > c1<-kmeans(data,3,20) > c1 $cluster [1] 1 1 1 1 1 1 1 3 3 3 1 3 1 3 3 1 1 1 1 3 1 3 3 1 1 1 3 3 1 1 3 1 1 1 1 3 3 [38] 3 1 1 1 3 1 1 1 1 3 3 3 1 1 1 1 1 1 3 1 3 1 1 3 1 1 1 1 3 1 1 1 1 1 1 3
2006 Feb 08
1
expand.grid without expanding
Dear list, I've recently came across a problem that I think I've solved and that I wanted to share with you for two reasons: - Maybe others come across the same problem. - Maybe someone has a much simpler solution that wants to share with me ;-) The problem is as follows: expand.grid() allows you to generate a data.frame with all combinations of a set of values, e.g.: >
2004 Oct 12
2
Statistical analysis of a large database
Deall all, We need to perform a statistical analysis of a large database (40,000 entries with approximately 500 fields in each entry) currently handled in Oracle. The data contains categorical variables only. At the current stage we suggest classification and clustering analysis. We are planning to perform the analysis in R and would be very grateful for any
2001 Mar 13
1
kmeans cluster stability
I'm doing kmeans partitioning on a small (n=26) dataset that has 5 variables. I noticed that if I repeatedly run the same command, the cluster centers change and the cluster membership changes. Using RW1022 under Windows NT & Windows 2000 >kmeans(pottery[,1:5], 4, 20) [...snip] $size [1] 7 3 9 7 [...snip] $size [1] 7 10 4 5 [...snip] $size [1] 6 10 5 5 yields a different
2010 Aug 18
1
Plotting K-means clustering results on an MDS
Hello All, I'm having some trouble figuring out what the clearest way to plot my k-means clustering result on an my existing MDS. First I performed MDS on my distance matrix (note: I performed k-means on the MDS coordinates because applying a euclidean distance measure to my raw data would have been inappropriate) canto.MDS<-cmdscale(canto) I then figured out what would be my optimum
2005 Mar 29
1
regression tree xerror
I am running some models (for the first time) using rpart and am getting results I don't know how to interpret. I'm using cross-validation to prune the tree and the results look like: Root node error: 172.71/292 = 0.59148 n= 292 CP nsplit rel error xerror xstd 1 0.124662 0 1.00000 1.00731 0.093701 2 0.064634 1 0.87534 1.08076 0.092337 3 0.057300 2
2004 Sep 03
2
windowing strategies
Hello to everybody, Does anyone has implemented a function for evaluating models using windowing strategies, such as growing window or sliding window ones? The aim is to evaluate regression models on a time series data. I do not use cross-validation once data sorted in a radom way does not make sense when evaluating time series. Thanks Joao Moreira
2004 Jul 15
5
formula
Hi, i 'dont understand how to take a general formula, view this: x<-1:5 y<-c(0,1,1.7,2,2.1.4) dummy<-data.frame(x=x,y=y) formula<-"y~A*log(x)/log(2)" formu<-as.formula(formula) fm<-lm(formu,data=dummy) Error in eval(expr, envir, enclos) : Object "A" not found but A is the parameter of fitting, why is this?Thanks Ruben