[MRG] Factor out split data as struct in Tree splitters and builders

This uses a struct to store 6 C variables that get passed by tree builders into splitters, where they are duplicated for the current and best candidate. Copying `current` to `best` is now a one-liner. The refactor hence saves >300 lines of C code (or 18% of `_tree.c`!).

This changes the not-quite-public `Splitter.node_split` interface, so we may want to be conservative about it.

I originally made part of this patch as a contribution to #3173, where the code was duplicated another two times, but this version is a bit more ambitious in modifying the `node_split` interface and the tree builder, and I thought that might warrant separate review. If this interface is considered somewhat public, we might choose to include the change in 0.15 to minimise future API volatility.
Thanks. Overwrote that commit.


On 19 June 2014 07:22, Arnaud Joly <notifications@github.com> wrote:

>  In sklearn/tree/_tree.pyx:
>
> > @@ -902,6 +902,15 @@ cdef class FriedmanMSE(MSE):
> >  # Splitter
> >  # =============================================================================
> >
> > +cdef inline void _init_splitinfo(SplitRecord* self, SIZE_t start_pos) nogil:
>
> splitinfo?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/scikit-learn/scikit-learn/pull/3293/files#r13969928>.
>