Skip to content

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 27 Feb 20:08
· 32 commits to main since this release

NeuroTreeModels v1.4.0

Diff since v1.3.1

Model constructors (NeuroTreeRegressor, NeuroTreeClassifier) now include the following arguments:

  • metric: the evaluation metric to be tracked
  • early_stopping_rounds
  • device=:cpu: either :cpu or :gpu
  • gpuID=0: the gpu device ID

Example:

config = NeuroTreeRegressor(
    loss = :mse,
    nrounds = 10,
    num_trees = 16,
    depth = 5,
    device = :cpu
)

These arguments have been removed from fit

m = NeuroTreeModels.fit(config, dtrain; feature_names, target_name)

This provides the ability to train on GPU when using the MLJ interface:

using MLJBase, NeuroTreeModels
m = NeuroTreeRegressor(depth=5, nrounds=10, device=:gpu)
X, y = @load_boston
mach = machine(m, X, y) |> fit!
p = predict(mach, X)

Note that inference is always performed on :cpu when using MLJ's predict.
For GPU inference, should use p = mach.fitresult(X; device=:gpu)

Merged pull requests: