Skip to content

NeuroTrees

NeuroTabModels.Models.NeuroTrees.act_dict Constant
julia
act_dict

Dictionary mapping feature activation symbols to their functions. Supported keys: :identity, :tanh, :hardtanh, :tanhshrink.

source
NeuroTabModels.Models.NeuroTrees.NeuroTree Type
julia
NeuroTree(feats => outs; tree_type=:binary, actA=identity, scaler=true,
          depth, trees, k, init_scale=0.1)

Differentiable tree ensemble layer. Outpout dims: [outs, k, batch_size].

Arguments

  • feats::Int: Number of input features.

  • outs::Int: Number of output targets per tree ensemble.

  • tree_type::Symbol: :binary or :oblivious.

  • actA: Feature activation applied to split weights.

  • scaler::Bool: Scale logits with a learned softplus factor.

  • depth::Int: Tree depth.

  • trees::Int: Number of trees in the ensemble.

  • k::Int: Ensemble size.

  • init_scale::Float32: Standard deviation for leaf weight initialization.

source
NeuroTabModels.Models.NeuroTrees.NeuroTreeConfig Type
julia
NeuroTreeConfig(; kwargs...)

Configuration for differentiable neuro-tree ensembles.

Arguments

  • tree_type::Symbol: :binary or :oblivious (default :binary).

  • actA::Symbol: Feature activation. One of :identity, :tanh, :hardtanh, or :tanhshrink (default :identity).

  • depth::Int: Tree depth (default 4).

  • ntrees::Int: Number of trees per layer (default 32).

  • k::Int: Ensemble size.

  • hidden_size::Int: Hidden dimension for stacked trees (default 1).

  • stack_size::Int: Number of stacked tree layers (default 1).

  • scaler::Bool: Apply softplus scaling on tree logits (default true).

  • init_scale::Float32: Leaf weight init scale (default 0.1).

  • MLE_tree_split::Bool: Split output head for Gaussian MLE (default false).

source
NeuroTabModels.Models.NeuroTrees.NeuroTreeConfig Method
julia
(config::NeuroTreeConfig)(; nfeats, outsize)

Build a Lux.Chain from config.

Arguments

  • nfeats::Int: Number of input features.

  • outsize::Int: Number of output units.

Returns

A Lux.Chain of stacked neuro-tree layers.

source
NeuroTabModels.Models.NeuroTrees.get_logits_mask Method
julia
get_logits_mask(::Val{:binary}, depth::Integer)
source
NeuroTabModels.Models.NeuroTrees.get_softplus_mask Method
julia
get_softplus_mask(::Val{:binary}, depth::Integer)
source