Please help me resolve this error, [OptimizeHyperparameters,HyperparameterOptimizationOptions,~,RemainingArgs] = internal.stats.parseArgs(...
显示 更早的评论
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 个评论
Walter Roberson
2022-4-15
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!