Added SNV
This commit is contained in:
parent
6b1916b8cd
commit
05b4b47a97
2 changed files with 14 additions and 3 deletions
|
|
@ -30,6 +30,7 @@ export TRLooCVUpdateNaive
|
|||
export TRLooCVUpdateExperimental
|
||||
|
||||
# From "variousRegressionFunctions.jl"
|
||||
export SNV
|
||||
export EMSC
|
||||
export EMSCCorrection
|
||||
export cVals
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
function SNV(X)
|
||||
|
||||
X_SNV = zeros(size(X));
|
||||
means = mean(X, dims=2);
|
||||
stds = std(X, dims=2);
|
||||
X_SNV = @. (X - means) / stds;
|
||||
|
||||
return X_SNV;
|
||||
end
|
||||
|
||||
function EMSCCorrection(X, basis)
|
||||
|
||||
coeffs = basis \ X';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue