D. Advanced Topics Copyright © 2025 Norsys Software Corp.

3. Managing case files

Cases are the atoms of experience, the basis of learning, and it is useful at times to process these atoms in special ways. Over the years, Netica has become increasingly powerful in, and flexible at, handling cases. We expect this evolution to continue. If you think of new ways to manage cases that would make your work easier, please tell us.

Reading cases one by one. We have seen how selecting Relation->"Incorp Case File" will read all the cases in the file in one pass. Sometimes it is desirable to read the cases singly, to watch how the net's probabilities evolve as learning progresses, or even just as a way of viewing each case in its net instantiation. To begin reading cases singly choose File->"Get Case" or press the F8 key.

The F8 key and File->"Get Case", however, have slightly different behaviors:

  1. File->"Get Case" always raises a dialog asking you which case file to read from, and also which case to read. If the case file stores IDnums (see the Case File Format), the dialog will ask for one, otherwise it will ask for the position of the case.
  2. The F8 key does the same as the above, but only if single case reading has not yet begun. Thereafter, it just automatically reads the next case in the file (the one immediately following the last one read), without raising any dialog boxes. This makes it ideal for "stepping through" the cases, and is typically how you would use this key. Note that Netica prints the case's number in the Messages window, so you can always look there to see which case was last read.

Applying cases from one net to another net. It is perfectly acceptable to read a case into a network A, when that case was created and saved from some other network, B. It is not necessary that A and B share the same nodes. However, only the nodes in B that share identical names, identical numbers of states, and identical state names (if state names are present) with those in A, will be affected. All others are ignored. Note that all name comparisons are case-sensitive.

Numeric values take precedence over state values. Real number values that you have entered as findings for discretized continuous nodes are saved in case files, rather than just the state they correspond to. This enables reading the case into another network whose node for that variable has been discretized in a different way, say with more or fewer states.

Missing state values and the "Other" state. If you read in a case, and the case file has a value that isn't any of the states of the corresponding node in the network, then an error message will be displayed. For example, if node 'color' was defined with only two states, 'red' and 'green', and in the case file a value of 'blue' is found, then the error message will be displayed. However, there is an exception to this rule. If the node (in the network, not the case file) has a state named 'other' or 'Other'. Then the case will be read without error, and the finding for the node will be 'other'.

Return to Tutorial Home