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 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
Aggregate optimization results, specified as an AggregateBayesianOptimization
object.
Output Arguments
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 Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)