This internal function is called from bagging_predict to calculate the margin on the current tree using the test set.
calculate_margin_for_tree(preds, actuals, count_classified_correct, total)
Predictions on the test set.
The actuals classes ie. the target variables.
The number of correctly classified predictions.
The number of rows in the test set.
returns the margin for the current tree.