Skip to content

Commit 968da60

Browse files
authored
Merge pull request #18 from JuliaAI/new-traits
Add new traits to to support better MLJ machine type checks and composite models
2 parents d70ee0c + 5e6426f commit 968da60

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StatisticalTraits"
22
uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9"
33
authors = ["Anthony D. Blaom <[email protected]>"]
4-
version = "2.0.1"
4+
version = "2.1.0"
55

66
[deps]
77
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"

src/StatisticalTraits.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ const TRAITS = [
99
:input_scitype,
1010
:output_scitype,
1111
:target_scitype,
12+
:fit_data_scitype, #
13+
:predict_scitype, #
14+
:transform_scitype, #
15+
:inverse_transform_scitype, #
1216
:is_pure_julia,
1317
:package_name,
1418
:package_license,
@@ -24,6 +28,7 @@ const TRAITS = [
2428
:human_name,
2529
:is_supervised,
2630
:prediction_type,
31+
:abstract_type, #
2732
:hyperparameters,
2833
:hyperparameter_types,
2934
:hyperparameter_ranges,
@@ -133,6 +138,10 @@ snakecase(s::Symbol) = Symbol(snakecase(string(s)))
133138
input_scitype(::Type) = Unknown
134139
output_scitype(::Type) = Unknown
135140
target_scitype(::Type) = Unknown
141+
fit_data_scitype(::Type) = Unknown
142+
predict_scitype(::Type) = Unknown
143+
transform_scitype(::Type) = Unknown
144+
inverse_transform_scitype(::Type) = Unknown
136145

137146
# The following refer to properties of the package defining a type,
138147
# for use in, say, a registry of machine learning models. All but the
@@ -157,6 +166,7 @@ prediction_type(::Type) = :unknown
157166

158167
# Miscellaneous:
159168

169+
abstract_type(::Type) = Any
160170
is_wrapper(::Type) = false # or `true`
161171
supports_online(::Type) = false # or `true`
162172
docstring(M::Type) = string(M) # some `String`

0 commit comments

Comments
 (0)