Data count

Data Count allows the number of cases that match the evidence currently set on a Bayesian network or dynamic Bayesian network to be counted from a data source such as a database or spreadsheet.

This is useful when you want to determine how much of your data matches the current scenario (evidence). For example you might set evidence on a network such that Gender = Female and Height = Tall. Data count can then tell you how many tall females you have in your data.

When evidence is not set on a variable V (the value is missing/unknown/null), any data in the corresponding database column will match and increment the data count. However the inverse is not true. If you set evidence on V, data that is missing in the database column will not match V and not increment the data count. This is by design, otherwise if you set evidence in your network to Gender = Female, and then counted data that only has missing values for Gender, it would report that all the data is Female which it probably is not.

Data count

Opening

With a Bayesian network or Dynamic Bayesian network open, click the Data Count button on the main window toolbar tab entitled Data.

Data Count

To count data that matches your evidence:

  • First ensure that the evidence you want to count is set on the Bayesian network or dynamic Bayesian network.
  • Click the Data Count button. This will launch the Data connection manager window to choose a Data Connection followed by the Data tables and Data map windows in order to select tables, and map variables to columns.
  • The Data Count window will then display the number of cases from the database that match the current evidence. Both weighted and unweighted counts are calculated for those circumstances when case weights are used.