scikit-tree icon indicating copy to clipboard operation
scikit-tree copied to clipboard

Implement canonical correlation forests

Open adam2392 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Implement https://github.com/plai-group/ccfs-python

Describe the solution you'd like TBD. I need to re-read the paper to sketch out how it can be integrated into our Cython API. Assuming it is not doing anything complicated, then we just need to define sample_proj_mat and everything else works.

Describe alternatives you've considered A new API could be taken, but ideally this is also inheritable from the ObliqueSplitter setting.

Additional context

adam2392 avatar Feb 06 '23 20:02 adam2392

CCA = SVD + QR decomposiiton.

So someone just needs to find a C++/Cython robust implementation we can link to and import within our Cython code.

Maybe peruse scipy/numpy compiled-code to see if there's a compiled-function somewhere. I think rn some of it is entirely called within Python to call the compiled fortran/C functions (e.g. https://github.com/scipy/scipy/blob/f990b1d2471748c79bc4260baf8923db0a5248af/scipy/linalg/_decomp_svd.py#L126-L128).

So we wanna know can we grab the compiled-function from within Cython so we can call it within nogil blocks.

adam2392 avatar Oct 25 '23 00:10 adam2392

As a first step, one can implement just a CCA computation in Cython and then write a cpdef wrapper to expose it in Python for testing.

The second step would then utilize the CCA computation within a new Tree Splitter and then also write a cpdef wrapper to expose for testing.

The third step would expose this in a Python API layer.

adam2392 avatar Oct 31 '23 14:10 adam2392