You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using BetaML
using MLJBase
X = (x1 =rand(5), x2 =rand(5))
y = [1, 2, 3, 2, 1]
scitype(y)
# AbstractVector{Count}
M = BetaML.Bmlj.NeuralNetworkClassifier
@assertscitype(y) <:target_scitype(M)
verbosity =0
MLJBase.fit(M(), verbosity, X, y)
# ERROR: MethodError: Cannot `convert` an object of type# Nothing to an object of type# Vector# The function `convert` exists, but no method is defined for this combination of argument types.# Closest candidates are:# convert(::Type{Vector}, ::StatsBase.UnitWeights{T}) where T# @ StatsBase ~/.julia/packages/StatsBase/xgoZ5/src/weights.jl:317# convert(::Type{Vector}, ::StatsBase.AbstractWeights)# @ StatsBase ~/.julia/packages/StatsBase/xgoZ5/src/weights.jl:35# convert(::Type{T}, ::T) where T# @ Base Base.jl:126# ...# Stacktrace:# [1] setproperty!(x::BetaML.Utils.OneHotEncoder_lp, f::Symbol, v::Nothing)# @ Base ./Base.jl:52# [2] BetaML.Utils.OneHotEncoder(; kwargs::@Kwargs{…})# @ BetaML.Utils ~/.julia/packages/BetaML/NDCDt/src/Utils/Processing.jl:219# [3] fit(m::BetaML.Bmlj.NeuralNetworkClassifier, verbosity::Int64, X::@NamedTuple{…}, y::Vector{…})# @ BetaML.Bmlj ~/.julia/packages/BetaML/NDCDt/src/Bmlj/Nn_mlj.jl:342# [4] top-level scope# @ REPL[40]:1# Some type information was truncated. Use `show(err)` to see complete types.
Status `/private/var/folders/4n/gvbmlhdc8xj973001s6vdyw00000gq/T/jl_smBPYW/Project.toml`
[024491cd] BetaML v0.12.1
[a7f614a8] MLJBase v1.7.0
julia>versioninfo()
Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-1610:53 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (x86_64-apple-darwin22.4.0)
CPU:12×Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
WORD_SIZE:64
LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads:12 default, 0 interactive, 6 GC (on 12 virtual cores)
Environment:
JULIA_LTS_PATH =/Applications/Julia-1.10.app/Contents/Resources/julia/bin/julia
JULIA_PATH =/Applications/Julia-1.11.app/Contents/Resources/julia/bin/julia
JULIA_EGLOT_PATH =/Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia
JULIA_NUM_THREADS =12
JULIA_NIGHTLY_PATH =/Applications/Julia-1.11.app/Contents/Resources/julia/bin/julia
The text was updated successfully, but these errors were encountered:
Sorry for the late reply... Christmas (and a strike of flu) in the middle...
I had a look... I can easily fix it to work on integer vectors, but the classifier internally works on one-hot encoding version of the data, so it doesn't exploit any information from the ordered nature of the data.
What would you suggest? That I fix the MLJ interface to get the classifier working with integer data or that I remove MMI.Count from target_scitype = AbstractVector{<: Union{MMI.Multiclass,MMI.Finite,MMI.Count}} ?
The text was updated successfully, but these errors were encountered: