Too many input arguments
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Dyuman Joshi
le 18 Août 2023
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
le 18 Août 2023
It's not a built-in MATLAB function. Check the documentation for it.
help aresparams
Réponses (1)
Voss
le 18 Août 2023
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 commentaires
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!