bartorch.roi_stat#
- bartorch.roi_stat(roi, input, stat='mean', *, bessel=False)#
Statistic of
inputover the regionroi.- Parameters:
roi (torch.Tensor) – Weights, binary for the plain statistics. Broadcasts against
input; an axis whereroihas size one andinputdoes not (or the reverse, several regions along it) is kept.stat ({"count", "sum", "mean", "std", "energy", "variance"}) –
countis the sum of the weights (-C);sumof the weighted values (-S);meantheir ratio (-M);energythe sum of squared deviations from the mean, not of squared values (-E);varianceenergy over count (-V);stdits root (-D).bessel (bool) – Divide by count minus one;
stdandvarianceonly (-b).
- Returns:
Broadcast shape of
roiandinput, with size one on the axes where both exceed one. Complex forsumandmean, real otherwise.- Return type:
torch.Tensor