optimizableVariable — Create Bayesian optimization variable metadata.
optimizableVariable(Name,Range) constructs a host metadata object describing a variable for Bayesian optimization workflows.
Syntax
v = optimizableVariable(Name, Range)
v = optimizableVariable(Name, Range, Name, Value)How optimizableVariable works
- The variable name must be a nonempty text scalar.
- Numeric ranges must contain exactly two finite, increasing bounds and default to
Typereal. Typeacceptsreal,integer, andcategorical; integer ranges must use whole-number bounds.- Categorical ranges are accepted as string arrays, scalar strings with explicit
Typecategorical, or cell arrays of text scalars and must be nonempty and unique. Transformacceptsnoneandlog; log transforms require positive real lower bounds or nonnegative integer lower bounds and are not accepted for categorical variables.Optimizeaccepts scalar logical values and defaults to true.- The result is an
optimizableVariablecompatibility object withName,Range,Type,Transform, andOptimizeproperties.
GPU memory and residency
optimizableVariable constructs host metadata for bayesopt; gpuArray range and option inputs are gathered before validation.
Examples
Real Variable
v = optimizableVariable("depth", [1 10])Expected output:
optimizableVariable compatibility object.Categorical Variable
v = optimizableVariable("kernel", ["linear" "rbf"], "Type", "categorical")Expected output:
optimizableVariable compatibility object.Using optimizableVariable with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how optimizableVariable changes the result.
Run a small optimizableVariable example, explain the result, then change one input and compare the output.
Related Stats functions
Ml
bayesopt · classify · confusionmat · crossvalind · cvpartition · fitclinear · fitctree · fitlm · kmeans · knnsearch · lasso · lassoglm · linkage · lscov · mnrfit · pdist · pdist2 · perfcurve · predict · regress · ridge · squareform · test · training · tsne
Summary
binocdf · boxplot · cdf · cdfplot · chi2cdf · corr · corrcoef · corrcov · cov · cov2corr · dummyvar · ecdf · filloutliers · fitdist · geomean · grpstats · harmmean · icdf · isoutlier · kstest · kurtosis · lsline · mad · mode · nanmax · normalize · normcdf · norminv · normpdf · onehotdecode · onehotencode · pdf · prctile · quantile · refline · rmse · skewness · tabulate · tcdf · tiedrank · tinv · tpdf · ttest2 · wblinv
Random
binornd · bootstrp · datasample · dividerand · exprnd · gamrnd · lhsdesign · mvnrnd · normrnd · random · randsample · rng · trnd · unidrnd · unifrnd · wblrnd
Hist
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.