Skip to content

Commit

Permalink
Add instruction on how to use MLJ
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjarvinen committed Jul 25, 2023
1 parent 2a02ea3 commit b9aeb77
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ using ACEfit
using PythonCall
```

## MLJ solvers

To use [MLJ](https://github.com/alan-turing-institute/MLJ.jl) solvers you need to load MLJ in addition to ACEfit

```julia
using ACEfit
using MLJ
```

After that you need to load an appropriate MLJ solver. Take a look on available MLJ [solvers](https://alan-turing-institute.github.io/MLJ.jl/dev/model_browser/). Note that only [MLJScikitLearnInterface.jl](https://github.com/JuliaAI/MLJScikitLearnInterface.jl) and [MLJLinearModels.jl](https://github.com/JuliaAI/MLJLinearModels.jl) have extension available. To use other MLJ solvers please file an issue.

You need to load the solver and then create a solver structure

```julia
# Load ARD solver
ARDRegressor = @load ARDRegressor pkg=MLJScikitLearnInterface

# Create the solver itself and give it parameters
solver = ARDRegressor(
n_iter = 300,
tol = 1e-3,
threshold_lambda = 10000
)
```

After this you can use the MLJ solver like any other solver.

## Index

```@index
```

Expand Down

0 comments on commit b9aeb77

Please sign in to comment.