turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Blogs
- :
- JMPer Cable
- :
- Fast Flexible Filling in Space Filling Designs

Article Options

- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content

Mar 17, 2015 6:03 AM
(719 views)

Fast Flexible Filling in Space Filling Designs

*This article originally appeared in JMPer Cable, Issue 29 Summer 2014.*

by Bradley Jones, PhD, JMP Principal Research Fellow, SAS and Ryan Lekivetz, JMP Research Statistician Developer, SAS

A new tool in the Space Filling Design platform supports placing design points in non-rectangular regions. Space-filling designs are very popular in experimentation with complex deterministic computer models. Such models give the same answer if you supply the same inputs, so controlling variability is not an issue.

Experimentation might take hours or even days to produce a single observation. The goal of experimentation with computer models is to find a much faster, faithful approximation to the computer model. You can then use this approximation to make predictions at untried points. Or, you can develop intuition about the relationships between the inputs and outputs of the computer model by making graphs using the simplified approximation model.

Building such graphs using the computer code itself takes too much time because of the huge number of points required to make such a plot. We call the new designs Fast Flexible Filling designs: they generate quickly, provide great flexibility in describing the region of experimentation, and do a good job of filling the space.

**Example of a Space-Filling Design**

Here is an example. Suppose that you were studying air quality over Georgia. You would likely be interested in covering the entire state in a uniform way. You have a limited budget of 100 air quality monitors. The design question is where to locate the monitors. Figure 1 shows the 100 point Fast Flexible Filling (FFF) design for this problem.

[Missing image]

The points do a good job of covering the state in a uniform fashion.

Suppose that you want to run a script to repeat this experiment. Maps and fast flexible filling designs are scriptable in JMP. The following sections describe how to get the map coordinates for Georgia and create the space-filling design.

**Get the Map Shape Coordinates**

JMP installs a set of data tables that contain geographical map data. Each map consists of two JMP data tables named with a common prefix:

• The -Name.jmp data table contains the unique names for the different regions.

• The -XY.jmp data table contains the latitude and longitude coordinates for the regions.

Map files are installed in Maps directory for your version of JMP. On Windows, look in C:/Program Files/SAS/JMP/11/ Maps (or in the JMPPro/11/Maps folder). On Macintosh, look in /Library/ Application Support/JMP/11/Maps.

See Create Maps from the Essential Graphing book in the Help menu or online documentation for more details about the built-in map files.

1. Open US-State-Name.jmp from the Maps folder. Look for Georgia and notice the shape ID is 11.

2. Open US-State-XY.jmp. Scroll down to row 903 and copy all rows for shape ID 11 into a new data table.

3. Run the following script to get the coordinates in a format that the Space Filling Design platform can use.

dt = Current Data Table();

mymap = dt << **Get as Matrix**( {X, Y} );

xx = mymap[**0,1**];

yy = mymap[**0,2**];

Show(min(xx), max(xx));

Show(min(yy), max(yy));

Show(xx, yy);

The minimum and maximum values of Georgia coordinates are written to the log, an abbreviated portion of which is shown in Figure 2.

[Missing image]

*Figure 2** Coordinates for North Carolina shown in the log*

**Set Up the Fast Flexible Filling Design**

Now that you have the map shape coordinates, you can create the space-filling design.

1. In JMP, select **DOE > Space Filling Design**. Two factors are defined by default.

2. Enter the minimum and maximum coordinates from the log into the Space Filling Designer. Rename **X1** to **longitude**. Change the minimum and maximum values to** -86** and **-80**. Rename **X2** to **latitude**. Change the minimum and maximum values to **30 **and **36**.

NOTE: For other designs, make sure you don’t define too big of a range so that your map shape only makes up a small fraction of it.

The factor table appears in Figure 3.

[Missing image]

**Figure 3** Factor table for the space filling design

**Specify the Disallowed Combinations for Coordinates**

The Space Filling Designer’s Fast Flexible Filling algorithm uniformly distributes points within the map shape. To keep the points within the unconstrained design region, you define an expression that rules out infeasible input variable combinations. The expression evaluates whether a point in the space-filling design falls outside of the map shape.

This Disallowed Combinations expression must return a nonzero value for infeasible values. One way to do this is to create a Boolean expression that evaluates to true or false. Suppose that factors X1 and X2 range from -1 to 1 and want points to occur within the unit circle. You specify that disallowed combinations are X12 + X22 > 1. That is, disallow any points that fall outside of the unit circle.

1. Copy the xx and yy variables from the log window.

2. Select **Disallowed Combinations** from the Space Filling Design red triangle menu. The Disallowed Combinations window appears – the same window used in the Custom Designer.

3. Paste the xx and yy variables into the Disallowed Combinations window.

4. Enter the following code at the end of the window:

!In Polygon(longitude, latitude,xx,yy)

This expression disallows any points outside of the map shape.

5. Click **OK**.

6. In the Space Filling Design window, click **Continue**. Fast Flexible Filling is the only design available because of the disallowed combinations.

7. Change the number of runs to 100 to better visualize the results.

8. Click** Fast Flexible Filling** to create the design. The design appears in a new window.

9. Click **Make Table** to create a data table that contains the Fast Flexible Filling design.

**Viewing the Design in Graph Builder**

Now you can view the design in Graph Builder to verify the design.

1. With the Fast Flexible Filling Design data table open, select **Graph > Graph Builder**.

2. Assign **longitude** to **X** and** latitude** to **Y**.

3. Right-click the graph, select **Graph > Background Map > US States**, and then click **OK**. You should get something similar to the graph shown in Figure 1.

**Final Thoughts**

If you’re dealing with maps that come in separate parts (such as states that have multiple Part ID numbers), we recommend creating FFF designs for each part ID individually. Over a map, an FFF design is different from taking a simple random sample of points over the map shape. An FFF design is intended to make a more even spread of the design points, making for better coverage over the map.

Note from Gail: You can also read Ryan's blog on this topic.

Article Tags

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.