search for: centroid

Displaying 20 results from an estimated 176 matches for "centroid".

2008 Aug 19
4
spatial probit/logit for prediction
Hello all, I am wondering if there is a way to do a spatial error probit/logit model in R? I can't seem to find it in any of the packages. I can do it in MATLAB with Gibbs sampling, but would like to confirm the results. Ideally I would like to use this model to predict probability of parcel conversion in a future time period. This seems especially difficult in a binary outcome model
2006 May 08
1
finding centroids of clusters created with hclust
Hello, Can someone point me to documentation or ideas on how to calculate the centroids of clusters identified with hclust ? I would like to be able to chose the number of clusters (in the style of cutree) and then get the centroids of these clusters. This seems like a quite obvious task to me, but I haven't been able to put my hands on a relevant command. Thank you, Moritz
2006 Mar 25
2
pairwise combinatons of variables
...is my complete approach: library(e1071) mat <- matrix( c(6,7,8,2,3,4,12,14,14, 14,15,13,3,1,2,3,4,2, 15,3,10,5,11,7,13,6,1, 15,4,10,6,12,8,12,7,1), ncol=9, byrow=T ) rownames(mat) <- paste("v", 1:4, sep="" ) tmat <- t(mat) cluster <- c(1, 2, 1, 3, 3, 3, 1, 2, 2) centroids <- matrix( 0, ncol=3, nrow=4 ) obj <- vector(mode="list", length=3) for (j in 1:4){ for (i in 1:3){ where <- which(cluster==i) # which obj is in which class? centroids[j,i] <- mean( tmat[ where,j ] ) obj[[i]] <- tmat[where,] } } colnames(centroids) <- paste( c(&...
2008 Jul 03
1
Otpmial initial centroid in kmeans
Helo there. I am using kmeans of base package to cluster my customers. As the results of kmeans is dependent on the initial centroid, may I know: 1) how can we specify the centroid in the R function? (I don't want random starting pt) 2) how to determine the optimal (if not, a good) centroid to start with? (I am not after the fixed seed solution as it only ensure that the cluster is the same at every run but n...
2009 Dec 10
1
question about centroid-linkage (cluster analysis)
Dear R community, I would be greatful if somebody could shed light on the following. I have created a set of 6 points to check how centroid agglomeration works in cluster analysis: > Y <- data.frame(x=c(-1,1,1,-1,10,12),y=c(1,1,-1,-1,0,0)) It is quite intuitive to understand that the last clusters to be joined will be {1,2,3,4} with {5,6}. Now, the centroid for the first cluster has coordinates (0,0), while the centroid for the...
2004 Jul 13
0
Calculating sum of squares deviation between 2 similar matrices
Hi all, I've got clusters and would like to match individual records to each cluster based on a sum of squares deviation. For each cluster and individual, I've got 50 variables to use (measured in the same way). Matrix 1 is individuals and is 25000x50. Matrix 2 is the cluster centroids and is 100x50. The same variables are found in each matrix in the same order. I'd like to calculate the 'distance' of matrix 1 to matrix 2 and get a ranking of matrix 2's distances (and row IDs 1 to 100) sorted by distance. I tried using the RDIST and DIST functions but they ha...
2009 Feb 05
1
Does the "labpt" object in the Polygons-class represent the centroid of the polygon
Hello, I need to calculate the centroids of some spatial polygons that I have placed into a Polygons-class object. Is the labeling point in the Polygons-class the centroid of the polygon? Thank you for your help.
2012 Nov 18
1
centroid of hclust
Dear UseRs,i want to find centroid of clusters, which i generated by hclust. Is there a way doing that? i took mean to elements in each cluster to get centroid but i am not sure if i am right? thanks in advanceeliza [[alternative HTML version deleted]]
2008 Feb 04
1
how to get points from SpatialPolygonsDataFrame
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080203/5ea1e3ad/attachment.pl
2008 Jun 02
1
LDA and centroids
Hello, I have carried out an lda analysis using the lda function of MASS package. I have plotted the LD1xLD2 to represent the data. Now I would like to get the centroids for each group of data and plot it on the LD1xLD2 graph. How can I get the centroid value from the lda object? Best, Dani -- Daniel Valverde Saub? Grup de Biologia Molecular de Llevats Facultat de Veterin?ria de la Universitat Aut?noma de Barcelona Edifici V, Campus UAB 08193 Cerdanyola del V...
2011 Apr 27
1
centroid representation and MANOVA
...ferent groups and 20 individual response per group, and about 12 variables collected for each. I want to represent the result in a 2D plot. PCA is not so good because the difference between the groups is not obvious. I have seen, in a recent paper, people doing a MANOVA and representing it in a centroid plot (they used Matlab to do it). I would like to do the same with R, but don't know what to do after the MANOVA... and nothing can be found in the Archives. Any suggestions? -- Dr. Julien Colomb FB Biologie, Chemie, Pharmazie Institut f?r Biologie Neurobiologie - K?nigin-Luise-Str. 28...
2012 Jul 04
1
Error in hclust?
Dear R users, I have noted a difference in the merge distances given by hclust using centroid method. For the following data: x<-c(1009.9,1012.5,1011.1,1011.8,1009.3,1010.6) and using Euclidean distance, hclust using centroid method gives the following results: > x.dist<-dist(x) > x.aah<-hclust(x.dist,method="centroid") > x.aah$merge [,1] [,2] [1,] -3...
2012 Oct 21
1
Linear discriminant function analysis based median as group centroid and nonparametric scale estimators???
...n intermediate step to find chemical parameters which are able to reclassify defined groups. These variables will be used in a next step where location and scale estimators of the groups are important. Traditionally linear discriminant analysis is used for reclassification which uses group-means as centroid. Caused by the characteristics of my data, I decided to use nonparametric estimators, median as location and median absolute deviation as scale estimator of the groups for the final step. For this purpose I would like to know which chemical parameters are able to reclassify the defined groups arou...
2016 Jul 26
3
K MEANS clustering
...an distances. I had implemented a K-Medioids algorithm using PAM just to try it out, after modifying the API for whatever more was required, and that seems fine, since we are dealing with document vectors and not arbitrary vectors. But with KMeans, I am not able to figure out how to represent these centroids during each iteration when the average of a cluster is to be computed. So my confusion is, how could i represent an arbitrary sparse vector to be used as the centroid in k means? Can anyone please guide me on this? Will using boost C++ be a solution? Thanks -------------- next part --------------...
2016 Mar 12
2
GSOC-2016 Project : Clustering of search results
...is being defined in terms of two free variables (j and m) and one bound one (i). Is the summation actually supposed to be over m? (Then within the summation x_i is a dw dimensional vector, as is c_j, ie they're both feature vectors, one representing a single item and one representing a cluster centroid.) I may be misreading something fundamentally here, because aspects of the combined algorithm just don't make sense to me. It doesn't help my understanding that the paper seems to use overlapping references for the particle positions and clusters (eg in (3), (4) and I think (5)), and the c...
2013 Jan 01
3
translate grouped data to their centroid
Given a data set with a group factor, I want to translate the numeric variables to their centroid, by subtracting out the group means (adding back the grand means). The following gives what I want, but there must be an easier way using sweep or apply or some such. iris2 <- iris[,c(1,2,5)] means <- colMeans(iris2[,1:2]) pooled <- lm(cbind(Sepal.Length, Sepal.Width) ~ Species, data=...
2001 Nov 19
3
dist
Hi list! I'm computing multivar. distances from a set of centroids to a (large) set of individuals. I'm now just using rbind to create a matrix (x) with the centroid and the individuals, then run as.matrix(dist(x)) and finally select the appropriate columns, as I'm not interested on the distances among individuals. Therefore, this procedure implies a wast...
2005 Jul 26
0
Hierarchical clustering with centroid method
Dear everybody! In the function hclust, at each stage distances between clusters are recomputed by the Lance-Williams dissimilarity update formula according to the particular clustering method being used. Using "centroid" method, Lance-Williams recurrence formula works properly only for euclidean distance. How is it possible to use properly centroid method with manhattan distance ? Thanks [[alternative HTML version deleted]]
2006 Feb 28
0
Canonical Values and Centroids for MANOVA plots
Hey, all, I'm trying to construct a centroid plot using canonical values from a MANOVA. I know that from the summary.manova object you can get Eigenvalues, and the H and E matrices (from SS$Treatment and SS$Residuals), but I am at a loss to get the loadings for the canonical values, nor values for the centroid centers and radii. Is ther...
2003 Sep 16
0
hclust: median, centroid (PR#4195)
There seems to be a bug in hclust (package mva) for clustering methods 'median' and 'centroid'. I have written a clustering program in C and discovered that the results for 'median' differ from those of hclust in R. I used a third program, written by someone else in Pascal, and that program agrees with the output of my program. I found yet another clustering program that seems...