.. _ProcWeylDesign: Procedure: Generate a Weyl design ================================= Description and Background -------------------------- A Weyl design (also known as a Richtmyer design) is one of a number of non-random space-filling designs suitable for defining a set of points in the :ref:`simulator` input space for creating a :ref:`training sample`. The :math:`n` point Weyl design in :math:`p` dimensions is generated by a generator set :math:`g=(g_1,\ldots,g_p)` of irrational numbers. See the "Additional Comments" below for discussion of the choice of generators. Inputs ------ - Number of dimensions :math:`p` - Number of points desired :math:`n` - Set of irrational generators :math:`g_1,\ldots,g_p` Outputs ------- - Weyl design :math:`D = \{x_1, x_2, \ldots, x_n\}` Procedure --------- For :math:`j=0,\ldots,n-1`, generate points as .. math:: x_{j+1}=\left(j\times g_1{\rm mod} 1, j\times g_2{\rm mod} 1,\ldots,j\times g_d{\rm mod} 1\right). Note that the operator "mod 1" here has the effect of returning the fractional part of each number. For instance, if :math:`j=7` and :math:`g_1 = \sqrt{2} = 1.414\ldots`, then .. math:: j\times g_1 = 9.89949\ldots and so .. math:: j\times g_1 {\rm mod} 1 = 0.89949\ldots. Additional Comments ------------------- A potential problem with Weyl designs is the difficulty in finding suitable generators. One suggestion is to let :math:`g_i` be the square root of the :math:`i`-th prime, but this may not work well when :math:`p` is large. References ---------- The following is a link to the repository for Matlab code for the Weyl sequence in up to 100 dimensions: `CPWeylSequence.m `_ (:ref:`disclaimer`).