Main Content

summary

Summary table for AggregateBayesianOptimization object

Since R2024b

    Description

    summary(AggregateResults) displays the objective function name, constraint function name, and a summary of the results for the hyperparameter optimization problems in the AggregateBayesianOptimization object AggregateResults.

    example

    S = summary(AggregateResults) returns the table S containing the hyperparameter optimization results summary.

    Examples

    collapse all

    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.

    Plot the model results.

    plot(hpoResults)

    Figure contains an axes object. The axes object with title Constrained Hyperparameter Optimization Results, xlabel CompactModelSize (bytes), ylabel kfoldLoss contains 2 objects of type scatter. These objects represent Feasible, Infeasible.

    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

    collapse all

    Aggregate optimization results, specified as an AggregateBayesianOptimization object.

    Output Arguments

    collapse all

    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 NameDescription
    MinObjectiveMinimum value of the objective function
    ConstraintAtMinObjectiveValue of the constraint function at the minimum observed value of the objective function
    ConstraintBoundsValues of the lower and upper constraint bounds
    ConstraintBoundsAreSatisfiedConstraint bounds indicator (true if the final model satisfies the constraint bounds, and false if it does not)
    FeasibleIndicator of model feasibility (true if the final model is feasible, and false if it is infeasible)
    LearnerAtMinObjectiveAttained model type

    The objective and constraint function names are stored in S.Properties.CustomProperties.

    Version History

    Introduced in R2024b