@@ -78,6 +78,7 @@ Helper function to write the metadata for a model `T`.
78
78
* `target_scitype=Unknown`: allowed scitype of the target (supervised)
79
79
* `output_scitype=Unkonwn`: allowed scitype of the transformed data (unsupervised)
80
80
* `supports_weights=false`: whether the model supports sample weights
81
+ * `supports_class_weights=false`: whether the model supports class weights
81
82
* `load_path="unknown"`: where the model is (usually `PackageName.ModelName`)
82
83
83
84
## Example
@@ -97,6 +98,7 @@ function metadata_model(
97
98
target= nothing ,
98
99
output= nothing ,
99
100
weights:: Union{Nothing,Bool} = nothing ,
101
+ class_weights:: Union{Nothing,Bool} = nothing ,
100
102
descr:: Union{Nothing,String} = nothing ,
101
103
path:: Union{Nothing,String} = nothing ,
102
104
@@ -105,9 +107,11 @@ function metadata_model(
105
107
target_scitype= target,
106
108
output_scitype= output,
107
109
supports_weights:: Union{Nothing,Bool} = weights,
110
+ supports_class_weights:: Union{Nothing,Bool} = weights,
108
111
docstring:: Union{Nothing,String} = descr,
109
112
load_path:: Union{Nothing,String} = path,
110
113
)
114
+
111
115
load_path === nothing && @warn WARN_MISSING_LOAD_PATH
112
116
113
117
program = quote end
@@ -119,6 +123,7 @@ function metadata_model(
119
123
_extend! (program, :target_scitype , target_scitype, T)
120
124
_extend! (program, :output_scitype , output_scitype, T)
121
125
_extend! (program, :supports_weights , supports_weights, T)
126
+ _extend! (program, :supports_class_weights ,supports_class_weights, T)
122
127
_extend! (program, :docstring , docstring, T)
123
128
_extend! (program, :load_path , load_path, T)
124
129
0 commit comments