Skip to content

Commit

Permalink
sampling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Jul 22, 2017
1 parent d51b7a1 commit 92d47ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MadsSenstivityAnalysis.jl
Expand Up @@ -265,18 +265,18 @@ function sampling(param::Vector, J::Array, numsamples::Number; seed::Integer=-1,
numgooddirections = numdirections
while !done
try
covmat = (v * diagm(1.0 ./ d) * u') .* scale
covmat = (v * diagm(1 ./ d) * u') .* scale
@show covmat
dist = Distributions.MvNormal(zeros(numgooddirections), covmat)
@show dist
done = true
catch errmsg
printerrormsg(errmsg)
# printerrormsg(errmsg)
numgooddirections -= 1
if numgooddirections <= 0
madscritical("Reduction in sampling directions failed!")
end
@show vo[:, 1:numgooddirections]
gooddirections = vo[:, 1:numgooddirections]
newJ = J * gooddirections
u, d, v = svd(newJ' * newJ)
Expand Down

0 comments on commit 92d47ab

Please sign in to comment.