BayesiaLab 5.0.7 provides great relationship analysis reports on individual models. I am trying to figure out how do you do classification and relationship analysis report in BayesiaLab between training data-set and test data-set.
Say, you have two datasets, (a-training.csv) which is used to build the belief network using the data-learning feature of BayesiaLab. Then, you want to do classification against the test dataset (a-test.csv) to find out
- How well the test features align with the trained model / belief network?
- Are there any anomalies (if yes, why and their corresponding sensitivity analysis) to analyze the difference between Mutual information, Pearson's correlation etc.
If you have a target node, you can use Analysis - Network Performance – Target menu to evaluate to performance of the model on both the learning and test sets (global precision, Confusion matrix, Lift, Gain and ROC curves).
If you do not have any target, you can use Analysis - Network Performance – Overall menu to compare the Joint Probability Distributions returned by your BBN on the learning and test sets.
The first solution consists in:
- Associate your test data set to your network
- Use the Overall Performance and extract the tail of the distribution in a file
- Associate this new data set (the tail) to your network and use the interactive inference to analyze why the joint probability is low, line per line (right click on the monitor panel and Sort by less probable evidence menu). The first monitor is the one corresponding the variable that makes falling the joint the most.
The second solution consists in:
- Save your test dataset + the corresponding joint (Inference – Batch Joint Probability menu)
- Edit this file in Excel
- Sort the data with respect to the joint
- Select a threshold for the joint and define a Boolean variable indicating if the joint is lower to this selected threshold
- Import this data set and do supervised learning to characterize this new target variable. Using the Markov Blanket will allow you getting the variables explaining why your joint is low.
The first solution consists in diagnosing line per line why the joint is low.
The second consists in finding a model that allows characterizing why a set of lines have a low joint probability.