x = rand(1:9, 10,5)
clf=fit(FeatureNormalizer, x)
predict(clf, x)
ERROR: MethodError: no method matching rescale!(::Array{Int64,2}, ::Array{Float64,1}, ::Array{Float64,1})
Closest candidates are:
rescale!{T<:AbstractFloat}(::AbstractArray{T<:AbstractFloat,2}, ::AbstractArray{T,1}, ::AbstractArray{T,1}) at REPL[4]:9
rescale!{T<:AbstractFloat}(::AbstractArray{T<:AbstractFloat,2}, ::AbstractArray{T,1}) at REPL[4]:9
in predict!(::FeatureNormalizer, ::Array{Int64,2}) at ./REPL[9]:3
in predict(::FeatureNormalizer, ::Array{Int64,2}) at ./REPL[10]:3
where as the following works
x = rand(10,5)
clf=fit(FeatureNormalizer, x)
predict(clf, x)
Is there a reason why
rescale!
is defined to work only withAbstractFloat
https://github.com/JuliaML/MLDataUtils.jl/blob/master/src/feature_scaling.jl#L32:L53where as the following works