import outerproduct as op
op.init()
ws = op.Workspace()
train_df = ws.table("customers")
# TabM: MLP-style tabular net (https://arxiv.org/abs/2410.24210)
tabm = (
op.ModelParamSpace(family="tabm")
.float("lr", 1e-4, 3e-3, log=True)
.categorical("n_blocks", [1, 2, 3, 4])
.int("d_block", 64, 512, log=True)
)
# TabICL: tabular foundation model (https://arxiv.org/abs/2602.11139)
tabicl = (
op.ModelParamSpace(family="tabicl")
.int("n_estimators", 1, 32, log=True)
.float("softmax_temperature", 0.5, 2.0)
.categorical("average_logits", [True, False])
.categorical("norm_methods", ["none", "power", "quantile"])
)
hpo_space = op.HPOSpace().add(tabm).add(tabicl)
model = op.reasoning.fit(
train_df,
hpo_space=hpo_space,
optimizer=op.Optimizer(kind="tpe", n_trials_per_step=5, n_steps=4),
task=op.Regression(label_column="sales_30d"),
).wait()