cstjean / ScikitLearn.jl

Julia implementation of the scikit-learn API https://cstjean.github.io/ScikitLearn.jl/dev/
Other
547 stars 75 forks source link

Using PythonCall #121

Open cstjean opened 1 year ago

cstjean commented 1 year ago

After yesterday's meeting, I was left pondering why using PythonCall would cause any problem at all in ScikitLearn. Couldn't we keep the overall code structure (i.e. keep cross_validation and friends as julia code) and just replace PyCall with PythonCall?

This interfacing code is also what MLJ needs IIUC, so if this was viable, then having a separate ScikitLearnPythonInterop.jl for that might be interesting.

@tylerjthomas9 What do you think?

Of course, from the meeting I gathered that PythonCall is a lot more important for MLJ than it is for ScikitLearn, so it makes sense to just start with the code living inside of MLJ.jl.

In any case, it's still not clear to me that the gains for ScikitLearn.jl are worth it, versus the pain of changing backend.

cc. @OkonSamuel @ablaom

tylerjthomas9 commented 1 year ago

PythonCall.jl has slightly different return/input data types that would require some massaging to get ScikitLearn.jl working with them. It is definitely possible. However, like you said, I am not sure it is worth the pain. Especially if the MLJ interface can just add a minimal PythonCall.jl wrapper that only has the parts that it needs.

cstjean commented 1 year ago

Ok, then let's keep that as an open option for the future. If other good reasons pop up and you're still interested, we can revisit.