Skip to Content

Curve View

Context

To illustrate the Node Editor for Continuous nodes, we use the node Sale Price\mathit{Sale\ Price} from the Ames dataset, which we explain in detail in Chapter 5 of our e-book. The node represents transaction prices of residential homes in the city of Ames, Iowa, i.e., the node does have an associated dataset.

In Curve View, we see an interface very similar to the discretization step in the Data Import Wizard. Thus, there are two ways to show the distribution of the data:

Cumulative Distribution Function

The default view shows a Cumulative Distribution Function (CDF) of the underlying data:

  • On the x-axis, the observations are ordered according to the corresponding y-values, from smallest to largest.
  • On the y-axis, the value of the node Sale Price\mathit{Sale\ Price} is plotted.
  • The horizontal lines on the plot indicate the thresholds of the intervals. In the screenshot below, we see four lines for four thresholds, which means that the distribution is currently binned into five intervals.
NodeEditorStatesContinuousNodeCurve

Usage

You can directly modify the thresholds on the CDF plot (as an alternative to editing the table in Table View).

Left-click a threshold to select it, or use Previous and Next to move through the thresholds. The selected threshold turns red, and the others remain blue. Its exact value appears in the Threshold Value field to the right of the plot.

  • To move a threshold, click on it and hold, then move it vertically. Release to fix its position.
  • The percentages displayed at the right end of a selected threshold refer to the share of observations that fall into the intervals above and below this threshold.
  • Instead of moving the selected threshold with your cursor, you can also type in a specific value into the Threshold Value field.
  • A vertical zoom function is available for examining the CDF curve in detail:
    • Hold Ctrl (Windows) or Cmd (macOS) and drag with the left mouse button across the vertical range on which you wish to focus.
    • To revert to the default zoom, hold Ctrl (Windows) or Cmd (macOS), then double-click anywhere in the plot area.
  • To add an additional threshold, right-click with your cursor on the desired y-position.
  • To remove an existing threshold, right-click on it to delete it.
  • The Generate a Discretization function is largely equivalent to the Discretization step in the Data Import Wizard. Please see that topic for more details.

Workflow animation

We illustrate the above functions in the following animation:

Probability Density Function

Click Density Function to display the probability density function (PDF). The x-axis shows the observed values, and the y-axis shows the estimated probability density at each value. Vertical lines mark the current thresholds. In the example below, four thresholds divide the range into five intervals.

NodeEditorStatesContinuousNodeCurvePDF

The Monitor shows a discrete representation of this distribution. That correspondence often makes the PDF view a more natural choice than the CDF view for setting thresholds.

BayesiaLab can plot the CDF directly from the data. It estimates the PDF using the Batch-Means method. The estimate is less reliable near the lower and upper boundaries. Take this limitation into account when setting or adjusting thresholds in the ranges marked by red vertical shading.

Usage (PDF view)

You can directly modify the thresholds on the PDF plot the same way as on the CDF plot.

Left-click a threshold to select it, or use Previous and Next to move through the thresholds. The selected threshold turns red, and the others remain blue. Its exact value appears in the Threshold Value field to the right of the plot.

  • To move a threshold, click on it and hold, then move it horizontally. Release to fix its position.
  • The percentages displayed at the top end of a selected threshold refer to the share of observations that fall into the intervals to the left and right of the threshold.
  • Instead of moving the selected threshold with your cursor, you can also type in a specific value into the Threshold Value field.
  • A horizontal zoom function is available for examining the PDF curve in detail:
    • Hold Ctrl (Windows) or Cmd (macOS) and drag with the left mouse button across the vertical range on which you wish to focus.
    • To revert to the default zoom, hold Ctrl (Windows) or Cmd (macOS), then double-click anywhere in the plot area.
  • To add an additional threshold, right-click with your cursor on the desired x-position.
  • To remove an existing threshold, right-click on it to delete it.
  • The Generate a Discretization function is largely equivalent to the Discretization step in the Data Import Wizard. Please see that topic for more details.