JuliaAI / MLJLinearModels.jl

Generalized Linear Regressions Models (penalized regressions, robust regressions, ...)
MIT License
80 stars 13 forks source link

schema(X) fails #69

Closed OkonSamuel closed 4 years ago

OkonSamuel commented 4 years ago

at https://github.com/alan-turing-institute/MLJLinearModels.jl/blob/master/src/mlj/interface.jl#L22 the function schema(X) fails. @tlienart

tlienart commented 4 years ago

Thanks I'll try to fix that asap

tlienart commented 4 years ago

yeah that's a shortcircuit that's buggy, I think that's a recent PR that I hadn't properly tested

OkonSamuel commented 4 years ago

yeah that's a shortcircuit that's buggy, I think that's a recent PR that I hadn't properly tested

I guess the MMI.schema method isn't extended

tlienart commented 4 years ago

What code did you use that threw this bug?

OkonSamuel commented 4 years ago

MMI.schema(X). This threw the following error.

ERROR: MethodError: no method matching schema(::MLJModelInterface.FullInterface, ::Val{:table}, ::Tables.MatrixTable{Array{Float64,2}})
tlienart commented 4 years ago

hmm that should work, do you have the latest version of MLJBase?

tlienart commented 4 years ago

I just did:

julia> MLJBase.MMI.schema(Xt)
┌─────────┬─────────┬────────────────────────────┐
│ _.names │ _.types │ _.scitypes                 │
├─────────┼─────────┼────────────────────────────┤
│ x1      │ Float64 │ ScientificTypes.Continuous │
│ x2      │ Float64 │ ScientificTypes.Continuous │
│ x3      │ Float64 │ ScientificTypes.Continuous │
│ x4      │ Float64 │ ScientificTypes.Continuous │
│ x5      │ Float64 │ ScientificTypes.Continuous │
└─────────┴─────────┴────────────────────────────┘
_.nrows = 100

but I'm using the dev branch of MLJBase, let's see...

Edit: no with MLJBase 0.13.5 it works for me, could you check?

OkonSamuel commented 4 years ago

Okay. Let me check. Am updating to latest version

OkonSamuel commented 4 years ago

@tlienart. It works

OkonSamuel commented 4 years ago

@tlienart. I just tested the master branch of this repo with nthreads=2 on MLJ.evaluate and MLJ.tunedmodel. It works perfectly. No issues.

tlienart commented 4 years ago

awesome thanks!