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
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!