LassoBench Benchmarks¶
The LassoBench collection provides high-dimensional hyperparameter optimization benchmarks based on Weighted Lasso regression.
More information about the functions is available in the LassoBench documentation.
Available Problems¶
bocode.LassoBench.LassoBreastCancerbocode.LassoBench.LassoDiabetesbocode.LassoBench.LassoDNAbocode.LassoBench.LassoLeukemiabocode.LassoBench.LassoRCV1bocode.LassoBench.LassoSyntHardbocode.LassoBench.LassoSyntHighbocode.LassoBench.LassoSyntMediumbocode.LassoBench.LassoSyntSimple
Example Usage¶
import bocode
import torch
# Create a LassoBench problem
problem = bocode.LassoBench.LassoBreastCancer()
# Get problem information
bounds = problem.bounds
optimum_function_value = problem.optimum
optimum_input_value = problem.x_opt
# Evaluate at a point
x = torch.Tensor([[0.0] * problem.dim])
values, constraints = problem.evaluate(x)
print(f"Lasso Breast Cancer function value at origin: {values[0]}")
Output:
Lasso Breast Cancer function value at origin: tensor([-0.2626])