Forum: developers


RE: control parameter names [ Reply ] By: Arne Henningsen on 2015-09-28 06:41 | [forum:42591] |
OK. I think that it is most important that the names of the arguments are consistent. |
RE: control parameter names [ Reply ] By: Ott Toomet on 2015-09-28 02:23 | [forum:42590] |
Just noticed that we have SUMTRho, SUMTQ, SUMTTol so I guess I go for the method in front and parameter behind, and underscore inbetween. |
RE: control parameter names [ Reply ] By: Ott Toomet on 2015-09-28 01:24 | [forum:42589] |
My motivation to put the method behind was that it resembles a class a little bit. You can image 'Marquardt' and 'NM' being classes, and then calling respective methods. This is S3 way. But you can think the same in C++ way and then you should have class (or rather variable) in front. So Marquadt_maxLambda is fine as well, perhaps even better. |
RE: control parameter names [ Reply ] By: Arne Henningsen on 2015-09-27 05:57 | [forum:42587] |
I agree that Bfgs and Cg look strange. Should the name of the parameter or the name of the optimisation method be named first? E.g. lambda0_Marquardt and beta_NM or marquardt_lambda0 and NM_beta or marquardtLambda0 and nmBeta? |
RE: control parameter names [ Reply ] By: Ott Toomet on 2015-09-25 01:12 | [forum:42586] |
Maybe. My rationale for "." was something like that: * different optimizers are a bit like classes * selecting between alpha.foo and alpha.bar sounds logical * these are values not function (at least now but maybe not in the future). CamelCase is in a way coherent but does not include a clear marker where the parameter name ends and where the optimizer name starts. There may also be issues with upper/lower case letters, for my eyes Bfgs and Cg look a little ugly. So perhaps underscore instead? lambda0_Marquardt, beta_NM? (looks like C for me ;-) Note that igraph >1.0 uses consistently underscores. (The issue with underscore is that it requires two underscores to get on under ESS/Emacs but that's a different issue.) Thoughts? |
RE: control parameter names [ Reply ] By: Arne Henningsen on 2015-09-24 13:36 | [forum:42583] |
Haven't really thought about this before. You suggestions make sense (to me). As the dot is used in R to separate method names from class names, I would prefer to use camelCase instead, e.g. lambda0Marquardt, betaNm, ... |
control parameter names [ Reply ] By: Ott Toomet on 2015-09-20 00:47 | [forum:42564] |
Do you have any idea for the naming scheme for the control parameters (inside the control list?) In my opinion the common names like alpha, beta, lambda may easily be overloaded. What about naming the specific ones like: lambda0.marquardt, beta.nm (for Nelder-mead) etc? And this would only apply for the new ones (ie marquardt-related) from now on. |