Hello. I put stuff in a 2-dimension link::Classes/FluidDataSet:: in the most even grid possible by minimising the distance I need to move each item around, using some clever algorithms. The grid space can be oversampled to allow for a sparser representation. The resulting grid shape can be constraint in one axis.
Maps a set of 2D points in a link::Classes/FluidDataSet:: to a rectangular grid using a variant of the link::https://www.gwern.net/docs/statistics/decision/1987-jonker.pdf##jonker-volgenant algorithm::. It can be useful to obtain compact grid layouts from the output of dimensionality reduction algorithms such as link::Classes/FluidUMAP::, link::Classes/FluidPCA:: or link::Classes/FluidMDS::. This is similar to projects like CloudToGrid (https://github.com/kylemcdonald/CloudToGrid/), RasterFairy (https://github.com/Quasimondo/RasterFairy) or IsoMatch (https://github.com/ohadf/isomatch).
Please refer to a webpage and an article for more information on the algorithm.
CLASSMETHODS::
CLASSMETHODS::
@ -18,13 +17,13 @@ ARGUMENT:: server
The server on which to run this model
The server on which to run this model
ARGUMENT:: oversample
ARGUMENT:: oversample
A factor to oversample the destination grid. The default is 1, so the most compact grid possible will be yield. Factors of 2 or more will allow a larger destination grid, which will respect the original shape a little more, but will therefore be sparser.
A factor to oversample the destination grid. The default is 1, so the grid has the same number of points as the input. Factors of 2 or more will allow a larger destination grid, which will respect the original shape a little more, but will also be sparser.
ARGUMENT:: extent
ARGUMENT:: extent
The size to which the selected axis will be constraint to. The default is 0, which turns the constraints off.
The size to which the selected link::#axis:: will be constrained. The default is code::0::, which turns the constraints off.
ARGUMENT:: axis
ARGUMENT:: axis
The axis on which the constraint size is applied to. The default (0) is horizontal, and (1) is vertical.
The axis to which the link::#extent:: constraint is applied. The default (code::0::) is horizontal, and (code::1::) is vertical.
INSTANCEMETHODS::
INSTANCEMETHODS::
@ -33,9 +32,9 @@ PRIVATE:: init
METHOD:: fitTransform
METHOD:: fitTransform
Fit the model to a link::Classes/FluidDataSet:: and write the new projected data to a destination FluidDataSet.
Fit the model to a link::Classes/FluidDataSet:: and write the new projected data to a destination FluidDataSet.