summary
Description
summary(
displays the
objective function name, constraint function name, and a summary of the results for the
hyperparameter optimization problems in the AggregateResults
)AggregateBayesianOptimization
object
AggregateResults
.
returns the table S
= summary(AggregateResults
)S
containing the hyperparameter optimization results
summary.
Examples
Display and Plot Aggregate Hyperparameter Optimization Results
Display and plot the results of a set of hyperparameter optimization problems stored in an AggregateBayesianOptimization
object.
Load the ionosphere data set.
load ionosphere.mat
Train a support vector machine classification model and optimize all eligible model hyperparameters for three optimization problems using the fitcsvm
function. For each problem, specify to use the size of the compact version of the trained model as the constraint, and to suppress the display of the command-line output and plots. Specify the constraint bounds as 0
to 10000
bytes for the first problem, 0
to 100000
bytes for the second problem, and 0
to 200000
bytes for the third problem. Use the 'expected-improvement-plus'
acquisition function for reproducibility. Use the default settings for the other hyperparameter optimization options.
rng(0,"twister"); % For reproducibility [Mdl,hpoResults]=fitcsvm(X,Y,OptimizeHyperparameters="all", ... HyperparameterOptimizationOptions=struct(ConstraintType="size", ... Verbose=0, ShowPlots=false, ConstraintBounds=[10000; 100000; 200000], ... AcquisitionFunctionName="expected-improvement-plus"));
Display a summary of the hyperparameter optimization results.
summary(hpoResults)
Objective: kfoldLoss Constraint: CompactModelSize (bytes) MinObjective ConstraintAtMinObjective ConstraintBounds ConstraintBoundsAreSatisfied Feasible LearnerAtMinObjective ____________ ________________________ ________________ ____________________________ ________ _____________________ Result_1 0.079772 21553 0 10000 false false "ClassificationSVM" Result_2 0.079772 36821 0 1e+05 true true "ClassificationSVM" Result_3 0.071225 31093 0 2e+05 true true "ClassificationSVM"
The first model has a constraint (CompactModelSize
) value of 21553
bytes at the minimum value of the objective function (kfoldLoss
). Because this value is outside the constraint bounds [0,10000]
, the model is not feasible. The other two models satisfy their constraint bounds and are feasible.
P
lot the model results.
plot(hpoResults)
The figure shows a scatter plot of the final value of the objective function (kfoldLoss
) versus the final value of the constraint function (CompactModelSize
) for each model in the set of hyperparameter optimization problems. The blue points indicate feasible models, and the red point indicates an infeasible model.
You can point to a plot marker to display a data tip that includes its x-axis and y-axis values, along with other parameters of the optimization problem.
Input Arguments
AggregateResults
— Aggregate optimization results
AggregateBayesianOptimization
object
Aggregate optimization results, specified as an AggregateBayesianOptimization
object.
Output Arguments
S
— Summary of hyperparameter optimization results
table
Summary of the hyperparameter optimization results, returned as a table.
S
includes a row for each hyperparameter optimization problem in
AggregateResults
and has the following columns.
Column Name | Description |
---|---|
MinObjective | Minimum value of the objective function |
ConstraintAtMinObjective | Value of the constraint function at the minimum observed value of the objective function |
ConstraintBounds | Values of the lower and upper constraint bounds |
ConstraintBoundsAreSatisfied | Constraint bounds indicator (true if the final model
satisfies the constraint bounds, and false if it does
not) |
Feasible | Indicator of model feasibility (true if the final
model is feasible, and false if it is infeasible) |
LearnerAtMinObjective | Attained model type |
The objective and constraint function names are stored in
S.Properties.CustomProperties
.
Version History
Introduced in R2024b
See Also
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)