First implementation of tree-based bias calculation