Model Building 201

 

This tutorial introduces several advanced topics in model building. It assumes that you have worked through the Model Building 101, 102, 103, and 104 tutorials.

 

Getting Started

In this section, you will learn some of the subtleties of parameter profiles. The most important controls are the relations that can exist between control points. These relations create dependencies to our models so that they can operate reliably with Auto Analysis.

To get started, just launch GemStone. We do not need to load a GemStone document or data file for this tutorial.

Click the Choose Parameter button in the Workspace toolbar, and then click Choose… to display the Edit Parameters dialog.

 

images\model201choose.gif

 

Find and select TDT and CD10 in the list. If these parameters are not listed, just choose two log parameters. Click Add and then OK.

 

Control Points

Right click the TDT plot, and select Choose Parameter Profile from the context menu. Choose the Step Down profile for TDT.

 

images\model201tdt.gif

 

Let’s look carefully at the first Control Point on the left. There are arrow tips pointing up and down. This indicates that this control point can fit data up or down. Now, look at the second Control Point. It has left and right arrow tips that indicate that it can fit data to the right or left. The third Control Point can fit data in any direction. Finally, notice that the last Control Point has no arrow tips, indicating that it does not fit data in any direction. Move each of these points to get a feeling for how they interact with each other.

 

Model Building Tip: Arrows Indicate the Direction of Movement

The arrow tips on a Control Point indicate the directions that the point can be moved by the program when it is fitting the model to the data. In many cases, you can manually move a point in other directions because it has a relation with another point.

 

These attributes of the Control Point are editable, and for some modeling situations you have to make changes to achieve the behavior your model requires. Let’s take a look at some of these important properties.

Double-click the first Control Point to display the editor.

 

images\model201editfirst.gif

 

 

We can edit characteristics related to the parameter intensity, state position, and standard deviation. Param controls properties related to the way the Control Point adjust on the parameter intensity axis. State controls the position on the progression, or state axis. SD relates to the line spread on the parameter intensity axis. Let’s drill deeper.

With Param selected in the list, click the Properties button in the Param group box at the bottom of the dialog. This will display the Param property editor.

 

images\model201firstparamprop.gif

The Value property shows the current position of the point on the parameter intensity axis. GemStone’s dynamic range for parameter values is a normalized scale of 0.0 to 100.0. We can directly edit the value here, but in most cases its easier to drag the point with the mouse or use one of the left or right arrows on the keyboard.

The next property is the Fit Status property. If it is checked, the point’s parameter value can be adjusted by GemStone’s fitting routines. This property determines whether or not up and down arrow tips are displayed on the graphical control point.

If the Can Change property is unchecked, you will not be able to move this CDP at all. Let’s see how this affects this and the other points in the parameter profile.

Uncheck the Can Change property and click on OK twice.

Now, try to move the first Control Point. You can’t.

Try to move the second point up or down. You can’t move it either.

Now try moving the third Control Point up to the top of the plot. When it is almost as high as the second point, you can’t move it any farther.

 

images\model201cantmove.gif

 

Why? The reason is that there is a relation between the third and second point. A relation defines a rule between two Control Points that restricts the movement in some way. In this case, there is a Less Than relation between the third point and the second. The third point must have a parameter intensity value that is less than the second point, and the system will not allow you to violate that relation. When you move the third point up, the system tries to move the second point up. However, when we changed the Can Change property, we told it that it could not move. Relations can be quite intricate and ultimately allow us to create models with some amazing properties.

 

Model Building Tip: Relations Can Restrict Movement

A relation is a rule defined between two Control Points that restricts the movement in some way. Relations can be based on parameter intensity or position along the progression (state) axis. They can affect points in the same profile as well as points in other profiles.

 

Let’s change our property back to what it was.

Double click on the first Control Point, select Param in the list, and click the Properties button at the bottom of the dialog.

Enable the Can Change property, and then click OK twice. The points can once again move as they had before.

 

Let’s review what we have discovered about these Control Points. Each Control Point is composed of three parts: Param, State, and SD. Param controls the up and down movement of the Control Point, State controls the left and right movement, and the SD controls the line spread. The Fit Status property for Param and State allow or disallow the estimation and minimization routines to change these values.

If you want a Control Point to be set to a value and not change, uncheck the Can Change property.

These properties give you some sophisticated control over how Auto Analysis does its job. You can tell it what values to manipulate and which ones to leave alone.

 

Model Building Tip: Use “Fit Status” and “Can Change”

When the Fit Status property is checked, the automatic adjustment routines in GemStone have permission to adjust the value of the Control Point. Uncheck this property when you only want the user to manipulate the value. Uncheck the Can Change property when you do not want the user or the adjustment routines to change a value.

 

Let’s now look at the relations in more detail.

 

Relations

Slowly move the second Control Point down and watch what happens with the other points.

Notice that the second point always moves vertically with the first. When the second point gets to the third point’s vertical position, it pushes the third point down. As the third point moves down, the fourth moves vertically with it. Let’s see why the behavior of the Step Down profile works this way.

Double-click the second Control Point to display its editor. Now double click the Param entry to show its two, defined relations.

 

images\model201editrelations.gif

 

Double click Relation1 to see its details.

 

images\model201editrelation1.gif

 

Relation1 is enabled and related to CellType1: TDT: First with an Equal to relationship. This is why the first Control Point always accompanies the second one as we move it up and down.

Click OK to close the dialog, and then double click Relation2 to see its properties.

 

images\model201editrelation2.gif

 

The parameter intensity value for the second definition point has a Greater than relation with the third point, CellType1: TDT: EndDown. This relation is what forces the second point to be greater than the third point.

 

Modifying a Relation

Suppose you wanted this point to remain greater than the second point by more than 20 units. Is it possible to create a relation with an offset of 20? Yes.

Type a value of 20 into the Offset property, and then click OK three times.

Now, move the second CDP down and watch what happens. As it approaches the third point, the third point starts moving down, too. If you move the third point up, you will see that the second point starts to move up. The two Control Points maintain a separation of more than 20 units (on a scale of 100).

The way to “read” the relation expression is represented by this equation:

BeginDown > (EndDown + 20)

 

Adding a Relation

Just to make sure you appreciate how sophisticated you can make these relations, let’s augment what we have done so far. We have changed the Greater than relation between the second and third Control Point so that the second is always 20 units or more greater than the third. Suppose we also want the second point to be no more than 40 units away from the third. In order to do this, we will need to add an additional relation. Here’s the expression:

BeginDown <= (EndDown + 40)

 

Double click on the second point again to bring up the editor. Double click Param and click New to create a new relation and view its editor. Choose the Less than or equal relation. Then, choose CellType1: TDT: EndDown as the Link Name. Enter 40 for its offset.

 

images\model201relation3.gif

 

Click OK three times to close all the editors. Now, move the second Control Point up and down to appreciate what we have done. We have established kind of window between these two points. The points can be no closer than 20 units, but no farther than 40 units from one another.

When we changed the second point’s relations to the third, the system automatically made the reverse entries for the third point’s relations. GemStone will always try to make these relations work bilaterally, which is normally what you want. If you need to have a unidirectional relationship, you can delete the relationships that are automatically added to the target point.

 

Reading a Relation Expression

We can generalize the relation expression. Given:

CDP_a is the Control Point we are editing

relationship is the relation to the other point, e.g. Greater than, Less than.

CDP_b is the target Control Point in the Link Name field

m is the Multiplier value

offset is the Offset value

Then the general expression for the relation is:

CDP_a relationship (m * CDP_b) + offset

 

Relations with Other Parameter Profiles

A Parameter profile can have sophisticated relations that constrain its shape and movement. You can also create relations with Control Points in any other Parameter Profile, even in other Cell Types. For example, suppose we wanted to create a model that coordinated the down regulation of TDT with the down regulation of CD10. Here’s how you would do that.

Click on the CD10 parameter plot to activate it. Then right click and select Choose Parameter Profile. Pick the Step Down parameter profile.

In the TDT plot, double click the second Control Point again. This time, double click the State item in the list and click New.

In the editor, choose Equal to for Relation to Link. Now click the Link Name and choose Celltype1: CD10: BeginDown. We are telling the GemStone that TDT and CD10 will begin the down transition at the same location on the progression (state) axis.

 

images\model201staterelation.gif

 

Click OK three times to close the editors.

Now move the second Control Point in the TDT profile back and forth and notice that the second point in CD10 moves back and forth as well. The two profiles are independent of one another in the vertical direction (the Param value).

 

Saving Relations

How do you save all this information? The relations are stored in the model document when you use the Save Document command. However, you can also save your customized relations in your own Parameter Profile file. This allows you to reuse your work in another model document. To do this, right click the TDT parameter plot and choose Edit Parameter from the context menu. In the Edit Properties dialog, use the Save and Open buttons to store and read a customized Parameter Profile.

If you save these parameters to disk and then retrieve them, the system will automatically make all the hookups you have specified when they are both read into a model.

 

Conclusions

Editing and creating relations is an advanced feature for GemStone. For some applications, it is important to add relations to ensure the system works reliably for complex analyses.

 

See also:

Tutorials and How To Section