Skip to content

Commit e9d9ea9

Browse files
committed
fix incorrect definition of supervised_fit_data_scitype re weights
1 parent 2a77b27 commit e9d9ea9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/model_traits.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ function supervised_fit_data_scitype(M)
5454
T = target_scitype(M)
5555
ret = Tuple{I, T}
5656
if supports_weights(M)
57-
W = AbstractVector{Union{Continuous, Count}} # weight scitype
57+
W = AbstractVector{<:Union{Continuous, Count}} # weight scitype
5858
return Union{ret, Tuple{I, T, W}}
5959
elseif supports_class_weights(M)
60-
W = AbstractDict{Finite, Union{Continuous, Count}}
60+
W = AbstractDict{Finite, <:Union{Continuous, Count}}
6161
return Union{ret, Tuple{I, T, W}}
6262
end
6363
return ret
@@ -67,7 +67,7 @@ StatTraits.fit_data_scitype(M::Type{<:Unsupervised}) = Tuple{input_scitype(M)}
6767
StatTraits.fit_data_scitype(::Type{<:Static}) = Tuple{}
6868
StatTraits.fit_data_scitype(M::Type{<:Supervised}) = supervised_fit_data_scitype(M)
6969

70-
# In special case of `UnsupervisedAnnotator`, we allow the target
70+
# In special case of `UnsupervisedAnnotator`, we allow the target
7171
# as an optional argument to `fit` (that is ignored) so that the
7272
# `machine` constructor will accept it as a valid argument, which
7373
# then enables *evaluation* of the detector with labeled data:

0 commit comments

Comments
 (0)