On Thu, May 24, 2012 at 05:35:27PM -0400, Ian Goodfellow wrote: > On Thu, May 24, 2012 at 5:09 PM, Gael Varoquaux > <[email protected]> wrote: > > On Thu, May 24, 2012 at 05:07:59PM -0400, David Warde-Farley wrote: > >> An alternative might be to just compute it in fit() if kernel == 'linear', > >> and make the property function return the precomputed vector in that case. > >> That probably minimizes the number of bugs introduced by either neglecting > >> to > >> update current functionality to use the dirty bit or future, orthogonal > >> functionality forgetting to respect the dirty bit. > > > > I think that I would actually prefer this option. > > OK--you are aware that coef_ is only defined in the case where kernel > == 'linear', > right? So the property would basically become nothing more than check on that > condition, followed by returning the value computed by fit.
I wasn't aware in suggesting it, but of course that makes sense. If using coef_ becomes the default within predict() when kernel == 'linear' then you're right, the property is kind of pointless: one could simply store the array itself in coef_. It might still be nice to keep the property for the purpose of raising an informative error message when people try to access it for nonlinear SVMs. David ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
