Please help me resolve this error, [OptimizeH​yperparame​ters,Hyper​parameterO​ptimizatio​nOptions,~​,Remaining​Args] = internal.s​tats.parse​Args(...

I am getting this error while running the code.
Error in classreg.learning.paramoptim.parseOptimizationArgs (line 10)
[OptimizeHyperparameters,HyperparameterOptimizationOptions,~,RemainingArgs] = internal.stats.parseArgs(...
Below attached is my code:
function [IsOptimizing, RemainingArgs] = parseOptimizationArgs(Args)
% Find the two NVPs 'OptimizeHyperparameters' and
% 'HyperparameterOptimizationOptions'. Error if
% 'HyperparameterOptimizationOptions' is there without
% 'OptimizeHyperparameters'. Return true if optimization is requested.
% Return RemainingArgs as the arglist without those two NVPs.
% Copyright 2016-2019 The MathWorks, Inc.
[OptimizeHyperparameters,HyperparameterOptimizationOptions,~,RemainingArgs] = internal.stats.parseArgs(...
{'OptimizeHyperparameters', 'HyperparameterOptimizationOptions'}, {[], []}, Args{:});
if isempty(OptimizeHyperparameters) && ~isempty(HyperparameterOptimizationOptions) && ~isPrefixEqual(HyperparameterOptimizationOptions, 'none')
bayesoptim.err('OptimOptionsPassedAlone');
end
IsOptimizing = ~isempty(OptimizeHyperparameters) && ~isPrefixEqual(OptimizeHyperparameters, 'none');
end
function tf = isPrefixEqual(thing, targetString)
tf = ~isempty(thing) && ischar(thing) && strncmpi(thing, targetString, length(thing));
end

1 个评论

Please show how you are calling the overall function, and please show the complete error message.
That looks like the kind of error you could get if you had code that previously used svmtrain() and did not convert it completely to the new routine names -- especially if you had been using the third-party SVM library.

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 MATLAB 的更多信息

产品

版本

R2022a

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by