API
Training
MLJModelInterface.fit Function
fit(
config::LearnerTypes,
dtrain;
feature_names,
target_name,
weight_name=nothing,
offset_name=nothing,
deval=nothing,
metric=nothing,
print_every_n=9999,
early_stopping_rounds=9999,
verbosity=1,
)Training function of NeuroTabModels' internal API.
Arguments
config::LearnerTypes: The configuration object defining the model architecture, loss, and training hyperparameters.dtrain: The training data. Must be<:AbstractDataFrame.
Keyword arguments
feature_names: Required. AVector{Symbol}orVector{String}of the feature names to use.target_name: Required. ASymbolorStringindicating the name of the target variable.weight_name=nothing: Optional. ASymbolorStringindicating the sample weights column.offset_name=nothing: Optional. ASymbolorStringindicating the offset column.deval=nothing: Optional. Evaluation data (<:AbstractDataFrame) for tracking metrics and early stopping.metric=nothing: Optional. The evaluation metric to track (e.g.,:mse,:logloss).print_every_n=9999: Integer. Logs training progress to the console everyNepochs.early_stopping_rounds=9999: Integer. Stops training if the evaluation metric does not improve for this many rounds.verbosity=1: Integer. Controls the logging level (0for silent,>0for info).device=:cpu: Symbol. Hardware device to use for training (:cpuor:gpu).gpuID=0: Integer. Specifies which GPU to use if multiple are available.
Inference
NeuroTabModels.Infer.infer Function
infer(m::NeuroTabModel, data; device=:cpu, backend=get(m.info, :backend, :zygote), proj=true)Run inference on batched feature data.
Arguments
m::NeuroTabModel: A fitted model.data: Iterable of feature batches.
Keyword arguments
device=:cpu: Execution device (:cpuor:gpu).backend: AD backend (:zygote,:enzyme, or:reactant). Defaults to the value stored on the model.proj=true: Whentrue, map raw outputs to natural scale. Set tofalsefor raw model-scale predictions.
infer(m::NeuroTabModel, df::AbstractDataFrame; device=:cpu, backend=get(m.info, :backend, :zygote), proj=true)Run inference on tabular data and return predictions.
Arguments
m::NeuroTabModel: A fitted model.df: Feature data as anAbstractDataFrame.
Keyword arguments
device=:cpu: Execution device (:cpuor:gpu).backend: AD backend (:zygote,:enzyme, or:reactant). Defaults to the value stored on the model.proj=true: Whentrue, map raw outputs to natural scale. Set tofalsefor raw model-scale outputs.