For RFE there is a specific test case where the coef_ is sparse. It's
sparse matrix in the current stable release of scipy. Should I define a
Post by Joel Nothmansafe_sqr applies when its operand may be a sparse matrix. In theory this
could be true of coef_, but I don't think this is tested as often as it
might be.
But, in general, you should not take what is done in any particular piece
of code to be indicative of best practice. There are often multiple ways to
do things, and while there may be a best choice, the best choice may change
over time as different parts of the codebase are atomically created or
modified. And we'll generally not be *that *nitpicky in reviewing, more
often focusing on readability, functionality and, where appropriate,
efficiency. In short, I don't think you need to worry about this much.
Supporting an arbitrary norm might be appropriate in RFE too.
HTH
- Joel
On 14 January 2016 at 03:40, WENDLINGER Antoine <
Post by WENDLINGER AntoineHi everyone,
I'm working on issue 2121
<https://github.com/scikit-learn/scikit-learn/issues/2121#issuecomment-171067587>,
and have trouble understanding when to use safe methods like safe_sqr. What
I would want to do here is use np.linalg.norm on the coeff array when it
is of dimension 2, but it seems it is not the way to go (since it's not
what is done for example in the RFE feature selector, where the l2 norm of
the coeff array is used). Am I missing something here ?
Regards,
Antoine
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general