Skip to content

Commit

Permalink
tables tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiedb committed Jun 15, 2023
1 parent 05b042d commit f113d02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/core-table.jl → test/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ y_train, y_eval = Y[i_train], Y[i_eval]

@testset "EvoTreeRegressor - NTuples" begin
# linear
params1 = EvoTreeRegressor(
config = EvoTreeRegressor(
loss = :linear,
nrounds = 100,
nbins = 16,
Expand All @@ -39,7 +39,10 @@ y_train, y_eval = Y[i_train], Y[i_eval]
rng = 123,
)

model, cache = EvoTrees.init(params1, x_train, y_train)
dtrain = (x1 = x_train[:, 1], y = y_train)
deval = (x1 = x_eval[:, 1], y = y_eval)

model, cache = EvoTrees.init(config, dtrain; target_name = "y")
preds_ini = EvoTrees.predict(model, x_eval)
mse_error_ini = mean(abs.(preds_ini .- y_eval) .^ 2)
model = fit_evotree(
Expand Down

0 comments on commit f113d02

Please sign in to comment.