I would like to know which commands to create an LHS design and then increase it with a higher score, if the model Not good enough? For example, I would first make 50 points LHS design, then increase the number (maybe in batches of 20) in the case of the model not enough. For example:
set1 = lhsdesign (5,5); Use the% 5x5 matrix% set 1, then determine whether more points are required Set2 =% some commands that add 20 points, to make it a 25x5 matrix then Difficulty running lhsdesign from 20 new points do not take into account the original issue. It is also done using the original points and by making such a new set of marks from scratch the work is wasted because new points are not included in the new set.
I was able to do a task that resolves this problem. I'm not sure the final matrix is a real Latin hyperbolic, but it connects the points given to the necessary points and moves them to the nearest available open channel (sub-category where no point is present).
Usage is as follows:
x1 = lhsdesign (200,17); XF = lhsaugment (x1,200); which adds 200 points in the x1 set of the digit, resulting in the xf is 400x17 matrix. The function is as follows:
function xF = lhsaugment (x1, nPoi)% function xF = lhsaugment (x1, nPoi)% to increase the Latin Hyperbolic X1 given by a number of digits ,% NPoi Only the length is changed, i.e. the points are added to the length. The original digits are unmounted and the outputs first appear in% xF. Thus the size of the xf is [size (x1,1) + npoe size (x1,2)]. X2 = lhsdesign (nPoi, size (x1,2)); NPoi = size (x2,1); OPoi = size (x1,1); TPoi = nPoi + oPoi; Fint = 1 / tPoi; For I = 1: TPE Segment (I, :) = [(I-1) * FInt I * FINT]; End xF = zero (TPOI, size (x1,2)); BX1 = zero (size (x1)); BX2 = zero (size (x2)); BF = zero (tPoi, size (x1,2)); IF = zero (1, size (x1,2)); IMove = 0; For I = 1: OPOJ = 1: L = 1 for the size (cBound, 1): Size (x1,2) if (x1 (i, l)> cBound (j, 1)) & amp; Amp; X1 (i, l) & lt; = CBound (j, 2)) and amp; Amp; (Bf (j, l) == 0) iF (1, l) = iF (1, l) +1; XF (if (1, L), L) x1 (i, l) =; BX1 (I, L) = 1; BF (J, L) = 1; Ethyph (X1 (I, L)> Seal (J, 1)) and amp; Amp; (X1 (i, l) & lt; = cBound (j, 2)) & amp; Amp; Amp; (BF (J, L) ~ = 0) iMin = size (cBound, 1); Pmin = size (cBound, 1); For m = j: -1: 1 if (bf (m, l) == 0) iMin = m; Pmin = j-meter; M = End End End Size for J. (Seal, 1) If (BF (M, L) == 0) & amp; Amp; (Mj & lt; PMI) iMin = m; Pmin = j + meters; Brake & End IF (1, L) = IF (1, L) +1; XF (if (1, L), L) x1 (i, l) =; BX1 (I, L) = 1; BF (iMin, L) = 1; Size (x2, 2): (x2 (i, l) & gt; c bound (i.e., i.e.) for the end end and end: NPOJ = 1: L = 1 for I = 1. 1 more ; & Amp; (X2 (i, l) & lt; = cBound (j, 2)) & amp; Amp; (BF (J, L) == 0) If (1, L) = iF (1, L) +1; XF (if (1, L), L) x2 (I, L) =; BX2 (I, L) = 1; BF (J, L) = 1; Ethyph (X2 (I, L)> Seal (J, 1)) and amp; Amp; (X2 (I, L) & lt; = Seal (J, 2)) & amp; Amp; Amp; (BF (J, L) ~ = 0) iMin = size (cBound, 1); Pmin = size (cBound, 1); For m = j: -1: 1 if (bf (m, l) == 0) iMin = m; Pmin = j-meter; M = End End End Size for J. (Seal, 1) If (BF (M, L) == 0) & amp; Amp; (Mj & lt; PMI) iMin = m; Pmin = j + meters; Brake & End IF (1, L) = IF (1, L) +1; XF (if (1, L), L) = (x2 (I, L) - (floor (x2 (I, L) / Fint) * Fint) + ((iMin -1) * Fint); BX2 (I, L) = 1; BF (iMin, L) = 1; If L == 1 iMove = iMove + 1; End end end end
No comments:
Post a Comment