centroid Questions
2
I have implemented a function to find the nearest data point to each centroid calculated after running the K-Means clustering algorithm. I wanted to know if there's a sklearn function that allows m...
Miculek asked 24/1, 2018 at 0:56
4
Solved
I want to do some spatial statistic analysis with the county-level crop yield data in Nebraska for the STAT class. For that I need the longitude and latitude of the geographic centroids of each cou...
3
Solved
I have a numpy array of 0's and 1's (512 x 512). I'd like to calculate the centroid of the shape of 1's (they're all connected in one circular blob in the middle of the array).
for i in xrange(len...
Kohler asked 13/8, 2016 at 14:11
2
Solved
I have a dataset two continuous variables and one factor variable (two classes). I want to create a scatterplot with two centroids (one for each class) that includes error bars in R. The centroids ...
Matinee asked 5/5, 2014 at 0:48
5
I am working with geospatial shapes and looking at the centroid algorithm here,
http://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon
I have implemented the code in C# like this (which is jus...
Veery asked 22/3, 2012 at 2:39
3
Solved
I have got a lot of x,y coordinates which I have clustered based on the distance between them.
Now I would like to calculate a centroid measure for each cluster of x,y coordinates.
Is there a way t...
Goolsby asked 30/10, 2013 at 14:25
2
Solved
I am SUPER new to python coding and would like some help. I was able to segment each cell outline within a biological tissue (super cool!) and now I am trying to find the centroid of each cell with...
Archfiend asked 18/7, 2020 at 14:39
1
This code is what I am using for silhouette_score.
And in here I am using Agglomerative Clustering, linkage as Ward.
I would like to get "Centroid" of Agglomerative Clustering, would it be possibl...
Concepcionconcept asked 5/6, 2019 at 8:13
1
Solved
This Question is more Theoretical, and not specifically trying to problem-solve.
I recently was introduced to the K-Means Clustering algorithm, and unsupervised machine learning algorithm, and I w...
Explosive asked 20/2, 2020 at 3:15
6
I'm using the centroid of polygons to attach a marker in a map application. This works definitely fine for convex polygons and quite good for many concave polygons.
However, some polygons (banana,...
Brachycephalic asked 29/5, 2018 at 15:27
2
Solved
I need to add labels to polygons and I normally use the centroid, however the centroid does not fall inside the polygon. I found this question Calculate Centroid WITHIN / INSIDE a SpatialPolygon bu...
1
Solved
Follow up from this question: gCentroid shifting centroid towards concentration of points, but with a trickier shape.
Using this SpatialPointsDataFrame I calculated the center using gCentroid, but ...
1
Solved
I have a data set with (labeled) clusters. I'm trying to find the centroids of each cluster (a vector that his distance is the smallest from all data points of the cluster).
I found many sol...
Undone asked 14/5, 2018 at 14:27
1
Solved
Question
Do the values returned by rgeos::gCentroid() and sf::st_centroid() differ? If so, how?
Context
After reading the relevant commands exported by rgeos section within the r-spatial/sf wiki...
4
Solved
I'm trying to work out how best to locate the centroid of an arbitrary shape draped over a unit sphere, with the input being ordered (clockwise or anti-cw) vertices for the shape boundary. The dens...
4
Solved
I am working on implementing k-means clustering in Python. What is the good way to choose initial centroids for a data set? For instance: I have following data set:
A,1,1
B,2,1
C,4,4
D,4,5
I nee...
Berliner asked 12/3, 2016 at 0:15
1
I am trying to manipulate some Brazilian Census data in R using the new "sf" package. I am able to import the data, but I get an error when I try to create the centroids of the original polygons
l...
2
Solved
I am trying to add up all the x and y coordiantes respectively from points of ArrayList.
public static ArrayList knots = new ArrayList<Point>();
public Point centroid() {
Point center = ...
1
Solved
In Software like ArcMap one can create centroids for polygons within a polygon. In cases like the one shown below this is necessary.
In R it is possible to calculate centroids of spatial polygons...
Mark asked 2/6, 2017 at 11:37
4
Solved
I need to calculate the centroids of a set of spatial zones based on a separate population grid dataset. Grateful for a steer on how to achieve this for the example below.
Thanks in advance.
requ...
3
I am ecologist, using mainly the vegan R package.
I have 2 matrices (sample x abundances) (See data below):
matrix 1/ nrow= 6replicates*24sites, ncol=15 species abundances (fish)
matrix 2/ n...
1
Summary: I thought that using gCentroid in R would return the centroid of a group of points, however I realised that for some reason it actually returns the geometric mean and not the centroid
I w...
4
Solved
I am trying to find the centroid of a contour but am having trouble implementing the example code in C++ (OpenCV 2.3.1). Can anyone help me out?
Egbert asked 31/1, 2012 at 4:3
1
I have spent all day reading up on the above MATLAB functions. I can't seem to find any good explanations online, even on the MathWorks website!
I would be very grateful if anyone could explain b...
Recognize asked 22/9, 2014 at 23:23
3
Given the location of vertices of a convex polyhedron (3D), I need to calculate the centroid and volume of the polyhedron. Following code is available at Mathworks site.
function C = centroid(P)
k...
Margie asked 6/1, 2013 at 21:17
1 Next >
© 2022 - 2025 — McMap. All rights reserved.