On Thu, May 24, 2012 at 04:22:30PM -0400, Ian Goodfellow wrote: > I think I need to introduce a dirty bit that determines whether coef_ > needs to be recomputed. It starts off as True, gets set to False > whenever coef_ executes, and gets set to True whenever self.fit is > called. Am I overlooking any other situations that should affect the > dirty bit?
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. > BTW I think now there is no bug in coef_. My script earlier was > getting weird results due to broadcasting behavior I didn't expect, > since coef_ returns an ndarray of shape (1,1000) and I'd been > expecting (1000,). Ah. The docs say "(n_class - 1, n_features)", which makes sense, but is a bit annoying in the binary case. 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
