Question about MLJ’s model

Why do I only have 14 models in my MJL.
But there are 55 models on the MJL website?

localmodels lists the models for which code is already loaded in the current session. If you have used fewer @load xxx then you’ll have fewer models.

1 Like

How can i have more, more comprehensive models?

I’m not sure what you’re asking but if you want a list of models and their providing package: List of Supported Models · MLJ is what you want

I have installed all the PKG, but why are there still only 14 built-in local models.

Create a folder, activate it, add MLJ and MLJDecisionTreeInterface then

(foo) pkg> status
      Status `~/Desktop/mljtest/foo/Project.toml`
  [add582a8] MLJ v0.17.0
  [c6f25543] MLJDecisionTreeInterface v0.1.3

julia> using MLJ

julia> length(localmodels())

julia> @load DecisionTreeClassifier pkg=DecisionTree;
[ Info: For silent loading, specify `verbosity=0`.
import MLJDecisionTreeInterface ✔

julia> length(localmodels())

Every time you add models from a different package in the current session all the models available from that package (here 5 from DecisionTree) get added to localmodels. Hope this clarifies it.

1 Like

I tried your method, but Julia reported the following error:

ERROR: ArgumentError: Package MLJDecisionTreeInterface not found in current path:

  • Run import Pkg; Pkg.add("MLJDecisionTreeInterface") to install the MLJDecisionTreeInterface package.

[1] require(into::Module, mod::Symbol)
@ Base .\loading.jl:893
[2] eval
@ .\boot.jl:360 [inlined]
[3] eval(x::Expr)
@ Base.MainInclude .\client.jl:446
[4] _import(modl::Module, api_pkg::Symbol, pkg::Symbol, doprint::Bool)
@ MLJModels C:\Users\Li.YY.julia\packages\MLJModels\4sRmw\src\loading.jl:34
[5] top-level scope
@ C:\Users\Li.YY.julia\packages\MLJModels\4sRmw\src\loading.jl:206

if you look at the error it tells you exactly what you need to copy paste in your REPL to fix it