Evovest / EvoTrees.jl

Boosted trees in Julia
https://evovest.github.io/EvoTrees.jl/dev/
Apache License 2.0
175 stars 21 forks source link

EvoTreeMLE retrun NaN #243

Closed 1991jhf closed 1 year ago

1991jhf commented 1 year ago

Hi, I have a dataset which EvoTreeMLE return NaN unless i make the eta and lambda equals to 0.001. However If I change to a similart dataset, or make the nrounds larger the configuartion also failed.

data.zip using JLD2,EvoTrees data=JLD2.load("data.jld2") x_train=data["X"] y_train=data["y"] config = EvoTrees.EvoTreeMLE() model=fit_evotree(config,metric=:gaussian_mle,x_train=x_train,y_train=y_train) EvoTrees.predict(model,x_train)

jeremiedb commented 1 year ago

I could reproduce. I think an associated "issue" is that for gaussian_mle / logistic_mle, the min_weight typically needs to be higher than 1. For example, the following seems to work fine:

config = EvoTrees.EvoTreeMLE(; min_weight= 32)
model = fit_evotree(config, metric=:gaussian_mle, x_train=x_train, y_train=y_train)
EvoTrees.predict(model, x_train)
1991jhf commented 1 year ago

Thank you, this solved my problem.