Quantcast
Viewing all articles
Browse latest Browse all 4448

How do I specify the number of nodes in voronoi.mosaic in R

@data_hacks wrote:

hello,

Voronoi plots are used to visualize voronoi decomposition of the data in kNN.Hence I am trying to use it for the same.My code for creating a voronoi.obj:

library("tripack")
x <- testing[,1]
y <- testing[,2]
voronoi.obj <- voronoi.mosaic(x, y, duplicate="remove")
voronoi.obj

Image may be NSFW.
Clik here to view.

As can be seen 60 nodes have been created,whereas the number of data points is only 45.
How can i specify the number of nodes to be created??
What I mean is:If i want 20 voronoi centers in my data,how do i specify that while creating the voronoi obj??
the plot(voronoi.obj) gives:
Image may be NSFW.
Clik here to view.

Can someone pls help me with this??

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles