Difference between revisions of "SobolSequence"
m |
|||
Line 1: | Line 1: | ||
− | = SobolSequence(n,i) = | + | === SobolSequence(n'', i'') === |
− | + | A Sobol sequence is a sequence of points intended to cover a multi-dimensional space more evenly than a purely random Monte Carlo sequence. This function returns the «n»<sup>th</sup> [http://en.wikipedia.org/wiki/Sobol_sequence Sobol sequence] along index «i», where «i» defaults to the [[Run]] index. «n» is a scalar (positive integer) and the result is indexed by «i». | |
− | = Example = | + | == Example == |
SampleSize := 256 | SampleSize := 256 | ||
Line 11: | Line 11: | ||
Variable Y := [[SobelSequence]](2) | Variable Y := [[SobelSequence]](2) | ||
− | + | Here is a scatter plot of '''Y''' vs. '''X''': | |
[[image:SobolScatter.png]] | [[image:SobolScatter.png]] | ||
− | The sequence tends to fill the 2-D space | + | The Sobel sequence tends to fill the 2-D space more evenly than a purely [[Uniform]] random scatter: |
[[image:RandomScatter.png]] | [[image:RandomScatter.png]] | ||
− | The Sobol | + | The Sobol has fewer instances of several points clustering closely or of large regions containing no points. |
− | = Description = | + | == Description == |
Given a set of j positive integers, n1, n2, ... nj, the sequences <code>SobolSequence(n1)</code>, <code>SobolSequence(n2)</code>, ..., <code>SobolSequence(nj)</code> tend to fill the j-dimensional unit hypercube in a manner that provides uniform coverage. | Given a set of j positive integers, n1, n2, ... nj, the sequences <code>SobolSequence(n1)</code>, <code>SobolSequence(n2)</code>, ..., <code>SobolSequence(nj)</code> tend to fill the j-dimensional unit hypercube in a manner that provides uniform coverage. | ||
Line 27: | Line 27: | ||
The sequences returned as «n» increases is defined by Analytica, but use successively higher-order Sobol polynomials as «n» increases. Internal polynomials are defined up from «n» equals 1 to 21,000. | The sequences returned as «n» increases is defined by Analytica, but use successively higher-order Sobol polynomials as «n» increases. Internal polynomials are defined up from «n» equals 1 to 21,000. | ||
− | = SobolSequence(n,nEncodesPolynomial: | + | == SobolSequence(n, nEncodesPolynomial: True) == |
You can specify the optional parameter «nEncodesPolynomial» as true to supply your own primitive polynomial. The bits of «n» then encode the coefficients of the primitive polynomial, with the highest order bit encoding the highest order polynomial term, and the constant 1 not included in the encoding. For example, the polynomial | You can specify the optional parameter «nEncodesPolynomial» as true to supply your own primitive polynomial. The bits of «n» then encode the coefficients of the primitive polynomial, with the highest order bit encoding the highest order polynomial term, and the constant 1 not included in the encoding. For example, the polynomial | ||
Line 35: | Line 35: | ||
is encoded as 0b1100. | is encoded as 0b1100. | ||
− | = See Also = | + | == See Also == |
* SysVar [[SampleType]] | * SysVar [[SampleType]] |
Revision as of 22:51, 1 November 2015
SobolSequence(n, i)
A Sobol sequence is a sequence of points intended to cover a multi-dimensional space more evenly than a purely random Monte Carlo sequence. This function returns the «n»th Sobol sequence along index «i», where «i» defaults to the Run index. «n» is a scalar (positive integer) and the result is indexed by «i».
Example
SampleSize := 256 Variable X := SobolSequence(1) Variable Y := SobelSequence(2)
Here is a scatter plot of Y vs. X:
The Sobel sequence tends to fill the 2-D space more evenly than a purely Uniform random scatter:
The Sobol has fewer instances of several points clustering closely or of large regions containing no points.
Description
Given a set of j positive integers, n1, n2, ... nj, the sequences SobolSequence(n1)
, SobolSequence(n2)
, ..., SobolSequence(nj)
tend to fill the j-dimensional unit hypercube in a manner that provides uniform coverage.
The sequences returned as «n» increases is defined by Analytica, but use successively higher-order Sobol polynomials as «n» increases. Internal polynomials are defined up from «n» equals 1 to 21,000.
SobolSequence(n, nEncodesPolynomial: True)
You can specify the optional parameter «nEncodesPolynomial» as true to supply your own primitive polynomial. The bits of «n» then encode the coefficients of the primitive polynomial, with the highest order bit encoding the highest order polynomial term, and the constant 1 not included in the encoding. For example, the polynomial
[math]\displaystyle{ x^4 + x^3 + 1 }[/math]
is encoded as 0b1100.
See Also
- SysVar SampleType
Enable comment auto-refresher