Difference between revisions of "SobolSequence"

m
Line 1: Line 1:
=== SobolSequence(n'', i'') ===
+
[[Category: Concepts]]
 +
 
 +
== 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».
 
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 ==
+
:<code>SampleSize := 256</code>
SampleSize := 256
+
:<code>Variable X := SobolSequence(1)</code>
&nbsp;
+
:<code>Variable Y := SobolSequence(2)</code>
Variable X := [[SobolSequence]](1)
 
&nbsp;
 
Variable Y := [[SobelSequence]](2)
 
  
Here is a scatter plot of '''Y''' vs. '''X''':
+
Here is a scatter plot of <code>Y</code> vs. <code>X</code>:
  
[[image:SobolScatter.png]]
+
:[[image:SobolScatter.png]]
  
The Sobel sequence tends to fill the 2-D space more evenly than a purely [[Uniform]] random scatter:
+
The Sobol sequence tends to fill the 2-D space more evenly than a purely [[Uniform]] random scatter:
  
[[image:RandomScatter.png]]
+
:[[image:RandomScatter.png]]
  
 
The Sobol has fewer instances of several points clustering closely or of large regions containing no points.
 
The Sobol has fewer instances of several points clustering closely or of large regions containing no points.
Line 23: Line 22:
 
== 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.  
  
 
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.  
Line 31: Line 30:
 
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
  
<math>x^4 + x^3 + 1</math>
+
:<math>x^4 + x^3 + 1</math>
  
 
is encoded as 0b1100.  
 
is encoded as 0b1100.  
  
 
== See Also ==
 
== See Also ==
 
 
* SysVar [[SampleType]]
 
* SysVar [[SampleType]]
 +
* [[Uniform]]
 +
* [[Distribution Densities Library]]
 +
* [[Making a Multi-D Scatter Plot]]

Revision as of 01:25, 12 February 2016


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 := SobolSequence(2)

Here is a scatter plot of Y vs. X:

SobolScatter.png

The Sobol sequence tends to fill the 2-D space more evenly than a purely Uniform random scatter:

RandomScatter.png

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

Comments


You are not allowed to post comments.