# Identify Cluster Centres for 2-dimensional Data via Data Sharpening

### Description

Identifies the centres of clusters for 2-dimensional data using a converged form of Choi and Hall's (1999) data sharpening method.

### Usage

1 | ```
sharp2d(x, y, hspace = 1, htime = 1, v = 1)
``` |

### Arguments

`x` |
the x coordinates of the data |

`y` |
the y coordinates of the data |

`hspace` |
the bandwidth for sharpening in the direction of the x axis |

`htime` |
the bandwidth for sharpening in the y direction |

`v` |
a positive integer representing the number of iterations to perform |

### Details

Identifies the centres of clusters based on a converged form of Choi and Hall's data sharpening method. This function was originally built for identifying clusters in space-time where space is the x-y plane and time is the z-axis.

### Value

Returns a (number of data points x 2) data frame containing the sharpened points x.sharp and y.sharp, respectively.

### Author(s)

Douglas G. Woolford, W. John Braun

### References

Woolford, D. G. and Braun, W. J. (2004) Exploring lightning and fire ignition data as point processes. 2004 Proceeding of the American Statistical Association, Statistics and the Environment Section [CD-ROM], Alexandria, VA: American Statistical Association.

Choi, E. and Hall, P. (1999) Data sharpening as a prelude to density estimation. Biometrika 86, 941-947.

### Examples

1 2 3 4 5 6 7 8 9 10 | ```
x <- 1:200
y <- c(rnorm(50,-1,1),rnorm(50,2,2), rnorm(100,0,.5))
data.sharp5 <- sharp2d(x,y,5,10,5)
data.sharp10 <- sharp2d(x,y,5,10,10)
# original data:
plot(x,y)
# sharpened data after 5 iterations:
points(data.sharp5$x.sharp, data.sharp5$y.sharp, col=2,pch=19)
# sharpened data after 10 iterations:
points(data.sharp10$x.sharp, data.sharp10$y.sharp, col=4, pch=19)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.