Fixed bug in oldregcoeffs
This commit is contained in:
parent
6008056412
commit
79657c58e0
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ function oldRegCoeffs(X, y, cvfolds, ncomps, regFunction=bidiag2) # bidiag2 OR P
|
||||||
cverror += sum((ytest .- Xtest*betas[2:end,:] .- betas[1,:]').^2, dims=1)';
|
cverror += sum((ytest .- Xtest*betas[2:end,:] .- betas[1,:]').^2, dims=1)';
|
||||||
end
|
end
|
||||||
|
|
||||||
cverror = cverror ./ n
|
cverror = cverror ./ size(X,1);
|
||||||
#rmsecv = sqrt.(rmsecv ./ size(X, 1))
|
#rmsecv = sqrt.(rmsecv ./ size(X, 1))
|
||||||
#minInd = argmin(rmsecv)[1]
|
#minInd = argmin(rmsecv)[1]
|
||||||
regCoeffsInds = findfirst(cverror .< (minimum(cverror) + std(cverror)/sqrt(length(unique(cvfolds)))))[1] # 1 S.E. rule
|
regCoeffsInds = findfirst(cverror .< (minimum(cverror) + std(cverror)/sqrt(length(unique(cvfolds)))))[1] # 1 S.E. rule
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue