Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


GeneralizedUmatrix (version 1.2.1)

XYcoords2LinesColumns: XYcoords2LinesColumns(X,Y) Converts points given as x(i),y(i) coordinates to integer coordinates Columns(i),Lines(i)

Description

XYcoords2LinesColumns(X,Y) Converts points given as x(i),y(i) coordinates to integer coordinates Columns(i),Lines(i)

Arguments

X(1:n), Y(1:n)

coordinates: x(i),y(i) is the i-th point on a plane

minNeurons

minimal size of the corresponding grid i.e max(Lines)*max(Columns)>=MinGridSize , default MinGridSize = 4096 defined by the numer of neurons

MaxDifferentPoints

TRUE: the discretization error is minimal FALSE: number of Lines and Columns is minimal

PlotIt

Plots the result

Value

GridConvertedPoints[1:Columns,1:Lines,2] IntegerPositions on a grid corresponding to x,y

Details

Details are written down in [Thrun, 2018, p. 47].

References

[Thrun, 2018] Thrun, M. C.: Projection Based Clustering through Self-Organization and Swarm Intelligence, doctoral dissertation 2017, Springer, Heidelberg, ISBN: 978-3-658-20539-3, https://doi.org/10.1007/978-3-658-20540-9, 2018.

Examples

Run this code
# NOT RUN {
data("Chainlink")
Data=Chainlink$Data
InputDistances=as.matrix(dist(Data))
res=cmdscale(d=InputDistances, k = 2, eig = TRUE, add = FALSE, x.ret = FALSE)
ProjectedPoints=as.matrix(res$points)
GridConvertedPoints=XYcoords2LinesColumns(ProjectedPoints[,1],ProjectedPoints[,2],PlotIt=FALSE)
# }

Run the code above in your browser using DataLab