mirror of
https://gitcode.com/gh_mirrors/ope/OpenFace.git
synced 2026-05-14 11:17:53 +00:00
29 lines
620 B
Matlab
29 lines
620 B
Matlab
function [ scaling ] = getScaling( alphas, betas, x, y, masks, PrecalcQ2s, useIndicator)
|
|
%getScaling Summary of this function goes here
|
|
% Detailed explanation goes here
|
|
|
|
% for visualisation use only the first sequence
|
|
nExamples = numel(x);
|
|
|
|
scalings = zeros(1,nExamples);
|
|
|
|
for q=1:nExamples
|
|
|
|
mask = masks{q};
|
|
|
|
PrecalcQ2 = PrecalcQ2s{q};
|
|
SigmaInv = CalcSigmaCCRF(alphas, betas, PrecalcQ2, mask, useIndicator);
|
|
|
|
|
|
b = CalcbCCRF(alphas, x{q}, mask, useIndicator);
|
|
y_est = SigmaInv \ b;
|
|
|
|
sc = std(y{q}) / std(y_est);
|
|
scalings(q) = sc;
|
|
end
|
|
|
|
scaling = mean(scalings);
|
|
|
|
end
|
|
|