On Sun, 30 Aug 2015, Mathieu Blondel wrote: > > One difficulty, though, is that the relevant citations in > scikit-learn > > estimators often depends on constructor options. For example, in > > LinearSVC, the paper to cite is not the same whether we use > dual=True or > > dual=False, penalty="l1" or penalty="l2", etc. > That is already partially handled, e.g. > > https://github.com/duecredit/duecredit/blob/master/duecredit/injections/mod_scipy.py#L134 > ... > conditions={(1, 'method'): {'ward'}},
https://github.com/datalad/datalad/pull/101 should make it even more complete. Now it will be possible to access attributes of the arguments, so something like conditions={(0, 'self.penalty'): {"l1"}} would trigger the citation only if that object's .penalty (on call to e.g. fit if I decorate it) is "l1". And for "l2" it would look like conditions={(0, 'self.penalty'): {"l2", "DC_DEFAULT"}} since 'l2' is the default penalty. Could you gimme the list of conditions/citations to implement for LinearSVC dependent on those dual/penalty? (or just send a PR for duecredit/injections/mod_sklearn.py -- don't worry if smth doesn't work, I would improve upon it) -- Yaroslav O. Halchenko Center for Open Neuroscience http://centerforopenneuroscience.org Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755 Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419 WWW: http://www.linkedin.com/in/yarik ------------------------------------------------------------------------------ _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general