Too many input arguments
3 次查看(过去 30 天)
显示 更早的评论
Hello,
Can somebody explain to me why when I run the code I get this message.
Error using aresparams
Too many input arguments.
Error in test (line 17)
trainParams = aresparams('maxFuncs', -1, 'c', 3, 'cubic', true, 'cubicFastLevel', 2,'selfInteractions',1, 'maxInteractions', 1, 'threshold',1e-4,'prune',
true, 'fastK',20, 'fastBeta',1, 'fastH',5,'useMinSpan', -1,'useEndSpan',-1, 'maxFinalFuncs',inf, 'endSpanAdjust',1, 'newVarPenalty',0.1,'terminateWhenInfGCV',false, 'allowLinear',0);
2 个评论
Dyuman Joshi
2023-8-18
There is no built-in or toolbox function named as aresparams in MATLAB.
Seems like it's a user-defined function.
Please copy and paste the output of this code -
which -all aresparams
Image Analyst
2023-8-18
It's not a built-in MATLAB function. Check the documentation for it.
help aresparams
回答(1 个)
Voss
2023-8-18
According to section 2.2 (page 7) of the attached pdf document, aresparams should be called like:
trainParams = aresparams(maxFuncs, c, cubic, cubicFastLevel, ...
selfInteractions, maxInteractions, threshold, prune, fastK, fastBeta, fastH, ...
useMinSpan, useEndSpan, maxFinalFuncs, endSpanAdjust, newVarPenalty, ...
terminateWhenInfGCV, yesInteract, noInteract, allowLinear, forceLinear)
Which means that you don't pass the parameter names ('maxFuncs','c','cubic', etc.), only their values (-1,3,true, etc.).
So instead of this:
trainParams = aresparams('maxFuncs', -1, 'c', 3, 'cubic', true, 'cubicFastLevel', 2, ...
'selfInteractions',1, 'maxInteractions', 1, 'threshold',1e-4,'prune',true, 'fastK',20, ...
'fastBeta',1, 'fastH',5,'useMinSpan', -1,'useEndSpan',-1, 'maxFinalFuncs',inf, ...
'endSpanAdjust',1, 'newVarPenalty',0.1,'terminateWhenInfGCV',false, 'allowLinear',0);
Do this:
trainParams = aresparams(-1, 3, true, 2, 1, 1, 1e-4, true, 20, 1, 5, -1, -1, inf, 1, 0.1, false, 0);
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!