diff --git a/src/StatisticalTraits.jl b/src/StatisticalTraits.jl index 003df24..cb22274 100644 --- a/src/StatisticalTraits.jl +++ b/src/StatisticalTraits.jl @@ -32,7 +32,8 @@ const TRAITS = [ :aggregation, :is_feature_dependent, :distribution_type, - :iteration_parameter + :iteration_parameter, + :supports_training_losses ] @@ -166,6 +167,7 @@ is_feature_dependent(::Type) = false reports_each_observation(::Type) = false distribution_type(::Type) = missing iteration_parameter(::Type) = nothing +supports_training_losses(::Type) = false # Returns a tuple, with one entry per field of `T` (the type of some # statistical model, for example). Each entry is `nothing` or defines diff --git a/test/runtests.jl b/test/runtests.jl index ed9c3b7..a0fd79a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -83,8 +83,7 @@ const NONCONSTANT = [:docstring, :name, :human_name, :hyperparameters, - :hyperparameter_types, - :iteration_parameter] + :hyperparameter_types] @testset "traits with constant fall-back" begin for trait in setdiff(StatisticalTraits.TRAITS, NONCONSTANT)