rust-wsp
A rust implementation of the WSP space filling algorithm.
This is based on the paper from J. Santiago et al:
[1] Santiago, J., Claeys-Bruno, M., & Sergent, M. (2012). Construction of space-filling designs using WSP algorithm for high dimensional spaces. Chemometrics and Intelligent Laboratory Systems, 113, 26-31.
Usage
Classic WSP
Here are a few examples of how to use rust-wsp.
After cloning the project, the algorithm can be run as follows:
This will run the WSP algorithm with 1000 initial points. Each point has a dimension of 10. The minimal distance between each point, as detailed in [1], is set to 0.5. For now, the algorithm uses the l1 (Manhattan) distance, as it provides better separation in high dimensional space than the l2 (euclidian) distance.
Adaptive WSP
The initial objective of WSP is to use it as a space filling algorithm, where we require points to have a given minimal with each other. The number of points in the resulting space is directly dependent of the distance.
In an experimental situation, it may be hard to choose the best distance between points, and the user generally has a better idea of how many points he wants in the space. As a result, rust-wsp also implements an adaptive method, which can be run as follows:
Similarly to the previous command, the initial space if filled with 1000 points of 20 dimensions. However, now, the user does not need to specify the minimal distance between points, but instead the desired number of points in the resulting set. The algorithm will perform a binary search on the minimal distance until 1) the resulting set contains the desired number of points or 2) there is not distance that can be found to reach this quantity. In the second scenario, rust-wsp uses the minimal distance resulting in a space where the number of points is as close as possible to the desired value.
Consider the example below, where we want 200 points in a space of 20 dimensions, initially filled with 1000 points:
)
The algorithm performs 54 iterations until the minimal distance search space is completely explored. It will recompute the space (if needed) qith the minimal distance resulting in the best approximation of the target number of active points in the set. Here, it is 201, with an error of 1 compared to the objective.
CLI arguments
Use --help to display the description of the command-line options.