Argmax
Public
DecisionFocusedLearningBenchmarks.Argmax.ArgmaxBenchmark
— Typestruct ArgmaxBenchmark{E} <: AbstractBenchmark
Basic benchmark problem with an argmax as the CO algorithm.
Fields
instance_dim::Int64
: instances dimension, total number of classesnb_features::Int64
: number of featuresencoder::Any
: true mapping between features and costs
DecisionFocusedLearningBenchmarks.Argmax.ArgmaxBenchmark
— MethodArgmaxBenchmark(
;
instance_dim,
nb_features,
seed
) -> ArgmaxBenchmark{E} where E<:(Flux.Chain{T} where T<:Tuple{Flux.Dense{typeof(identity), Matrix{Float32}}, typeof(vec)})
Custom constructor for ArgmaxBenchmark
.
Private
DecisionFocusedLearningBenchmarks.Argmax.one_hot_argmax
— Methodone_hot_argmax(
z::AbstractArray{R<:Real, 1};
kwargs...
) -> Any
One-hot encoding of the argmax function.
DecisionFocusedLearningBenchmarks.Utils.generate_dataset
— Functiongenerate_dataset(bench::ArgmaxBenchmark; ...) -> Any
generate_dataset(
bench::ArgmaxBenchmark,
dataset_size::Int64;
seed,
noise_std
) -> Any
Generate a dataset of labeled instances for the argmax problem.
DecisionFocusedLearningBenchmarks.Utils.generate_maximizer
— Methodgenerate_maximizer(
bench::ArgmaxBenchmark
) -> typeof(DecisionFocusedLearningBenchmarks.Argmax.one_hot_argmax)
Return an argmax maximizer.
DecisionFocusedLearningBenchmarks.Utils.generate_statistical_model
— Methodgenerate_statistical_model(
bench::ArgmaxBenchmark;
seed
) -> Flux.Chain{T} where T<:Tuple{Flux.Dense{typeof(identity), Matrix{Float32}}, typeof(vec)}
Initialize a linear model for bench
using Flux
.