diff --git a/Project.toml b/Project.toml index 5f05d50..afebf49 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StatisticalTraits" uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" authors = ["Anthony D. Blaom "] -version = "3.2.0" +version = "3.4.0" [deps] ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161" diff --git a/src/StatisticalTraits.jl b/src/StatisticalTraits.jl index f6df0e7..2f0676d 100644 --- a/src/StatisticalTraits.jl +++ b/src/StatisticalTraits.jl @@ -42,6 +42,7 @@ const TRAITS = [ :supports_training_losses, :deep_properties, :reporting_operations, + :constructor, ] @@ -172,6 +173,7 @@ abstract_type(::Type) = Any is_wrapper(::Type) = false # or `true` supports_online(::Type) = false # or `true` docstring(M::Type) = string(M) # some `String` +docstring(Contructor::Function) = Base.Docs.doc(Constructor) |> string is_supervised(::Type) = false # or `true` human_name(M::Type) = snakecase(name(M), delim=' ') # `name` defined below orientation(::Type) = :loss # or `:score`, `:other` @@ -184,6 +186,7 @@ iteration_parameter(::Type) = nothing supports_training_losses(::Type) = false deep_properties(::Type) = () reporting_operations(::Type) = () +constructor(::Type) = nothing # Returns a tuple, with one entry per field of `T` (the type of some # statistical model, for example). Each entry is `nothing` or defines