Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
giopaglia committed Aug 12, 2024
1 parent 68bec29 commit b47e27a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/machine-learning-utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Types for supervised machine learning labels (classification and regression).
"""

"""$(doc_supervised_ml)"""
const CLabel = Union{AbstractString,Integer,CategoricalValue}
const CLabel = Union{AbstractString, CategoricalValue, Integer} # TODO it is improper to consider Integer's as categorical labels. Should actually be RLabel's, and CategoricalValue's should be used, instead. However, atm some algorithms still rely on Int's labels to be intended as indices of a vector of class names...
"""$(doc_supervised_ml)"""
const RLabel = AbstractFloat
const RLabel = AbstractFloat # Real
"""$(doc_supervised_ml)"""
const Label = Union{CLabel,RLabel}

Expand Down Expand Up @@ -76,7 +76,7 @@ function bestguess(
if length(labels) == 0
return nothing
end

counts = begin
if isnothing(weights)
# return StatsBase.mode(labels) ..?
Expand Down

0 comments on commit b47e27a

Please sign in to comment.