Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
20160609
Browse files Browse the repository at this point in the history
1. Interpolation results for "nD-Interpolation" are now accessible
2. "plotScreeningAnalysis" can now be used for displaying optimal regions
3. Debug "plotParetoFront"
4. Debug MCMC with Slice algorithm: Respects now upper/lower bounds of input variable

Signed-off-by: Lazloo <[email protected]>
  • Loading branch information
Lazloo authored and Lazloo committed Jun 9, 2016
1 parent 3b3c8ee commit d51700a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
13 changes: 12 additions & 1 deletion dependencies/@AnalyzeKriging/plotParetoFront.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
% You can set:
% - ShowBounds: Decide if Confidence bounce should be shown
% - ShowData: Decide if the data used for the kriging model shall be
% plotted
% plotted. For more information see documentation of
% "plotParetoFrontData"
% - WidthConfidenceInterval: Decide how broad the condicence tube should
% be. This is related to normal
% distribution(mean value +-
Expand Down Expand Up @@ -77,6 +78,11 @@
objectOpt = findobj(gca,'DisplayName','Optimal Sample Points');
objectNonOptExtra = findobj(gca,'DisplayName','Non-optimal Extra Points');
objectOptExtra = findobj(gca,'DisplayName','OptimalExtra Points');
else
objectOpt = [];
objectNonOpt = [];
objectOptExtra = [];
objectNonOptExtra = [];
end
case 3
% Check if "gridFit" is available
Expand Down Expand Up @@ -125,6 +131,11 @@
objectOpt = findobj(gca,'DisplayName','Optimal Sample Points');
objectNonOptExtra = findobj(gca,'DisplayName','Non-optimal Extra Points');
objectOptExtra = findobj(gca,'DisplayName','OptimalExtra Points');
else
objectOpt = [];
objectNonOpt = [];
objectOptExtra = [];
objectNonOptExtra = [];
end
otherwise
error('plotParetoFront is not implemented for more than 3 objectives')
Expand Down
2 changes: 2 additions & 0 deletions dependencies/@AnalyzeKriging/plotScreeningAnalysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
% - Objective ... decide if the Kriging estimation ('KrigingInterpolation'), the expected
% improvement ('ExpectedImprovement') or optimal regions
% ('Optimum') shall be plotted
% - testValue ... if Objective = 'Optimum', testValue can be used as
% described in plotOptimum23D()
%
%
% Output: -
Expand Down
4 changes: 4 additions & 0 deletions dependencies/@BayesianOptimization/MCMCDistributionFctSlice.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
boolIsValid = boolIsValid&~bsxfun(@gt,estimationPoints,obj.UBInputVarInterpolation{obj.ObjectiveIndicesUsedByCalcNewSamplesViaMCMC(1)});
else
boolIsValid = true(nParameterSets,1);
boolIsValid = boolIsValid&~any(bsxfun(@lt,estimationPoints,obj.LBInputVarInterpolation{obj.ObjectiveIndicesUsedByCalcNewSamplesViaMCMC(1)}));
boolIsValid = boolIsValid&~any(bsxfun(@gt,estimationPoints,obj.UBInputVarInterpolation{obj.ObjectiveIndicesUsedByCalcNewSamplesViaMCMC(1)}));
end
probabilityDensity = log(0)*ones(nParameterSets,1);

Expand All @@ -43,6 +45,8 @@
obj.ObjectiveIndicesUsedByCalcNewSamplesViaMCMC,...
estimationPoints(boolIsValid,:)));
end
% else
% keyboard
end

end
Expand Down
4 changes: 2 additions & 2 deletions dependencies/@BayesianOptimization/calcNewSamplesViaMCMC.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

case 'Slice'
% Initialize Input Variables
randIniSample = rand(nInputVar,1).*(obj.UBInputVarInterpolation{firstKrigingIndex} - ...
randIniSample = rand(1,nInputVar).*(obj.UBInputVarInterpolation{firstKrigingIndex} - ...
obj.LBInputVarInterpolation{firstKrigingIndex}) + ...
obj.LBInputVarInterpolation{firstKrigingIndex};

Expand All @@ -114,7 +114,7 @@
sampleMatrix = slicesample(randIniSample,...
obj.getnMCMCLinks,...
'logpdf',distributionFct,...
'width',((obj.UBInputVarInterpolation{firstKrigingIndex}-obj.LBInputVarInterpolation{firstKrigingIndex})/5)');
'width',((obj.UBInputVarInterpolation{firstKrigingIndex}-obj.LBInputVarInterpolation{firstKrigingIndex})/5));

% Cutting out
sampleMatrixCutted = sampleMatrix(obj.nCutLinks+1:end,:);
Expand Down

0 comments on commit d51700a

Please sign in to comment.