open source pkg v1

This commit is contained in:
Vijay Yadev
2020-08-04 19:12:31 -04:00
parent bef213dba9
commit c389fc2c47
3708 changed files with 1624220 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
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