cstjean / ScikitLearn.jl

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

partial_fit! function not working #106

Closed athulsudheesh closed 2 years ago

athulsudheesh commented 2 years ago

While trying to use partial_fit! function I am getting the following error:

ERROR: LoadError: KeyError: key :partial_fit not found
Stacktrace:
 [1] __getproperty(o::PyCall.PyObject, s::Symbol)
   @ PyCall ~/.julia/packages/PyCall/L0fLP/src/PyCall.jl:307
 [2] getproperty
   @ ~/.julia/packages/PyCall/L0fLP/src/PyCall.jl:312 [inlined]
 [3] partial_fit!(py_model::PyCall.PyObject, args::Matrix{Float64}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ ScikitLearn.Skcore ~/.julia/packages/ScikitLearn/ssekP/src/Skcore.jl:102
 [4] partial_fit!(py_model::PyCall.PyObject, args::Matrix{Float64})
   @ ScikitLearn.Skcore ~/.julia/packages/ScikitLearn/ssekP/src/Skcore.jl:102
cstjean commented 2 years ago

What model are you calling it on? Not all models support partial_fit.

athulsudheesh commented 2 years ago

I tried with two: pca and logistic regression. Got the same error for both.

cstjean commented 2 years ago

Looking around the docs, I'm not sure those support partial_fit. Eg. there is apparently IncrementalPCA to explicitly support partial_fit. Maybe you can try with that?

athulsudheesh commented 2 years ago

Oh...Thank You @cstjean :) It's working!!!!