memoiry / LightML.jl

Minimal and clean examples of machine learning algorithms implemented in Julia
Other
404 stars 69 forks source link

test_LinearRegression ERROR #4

Closed rickhg12hs closed 6 years ago

rickhg12hs commented 7 years ago
julia> test_LinearRegression()
LinearRegression!200
ERROR: MethodError: no method matching add_reg(::ForwardDiff.Dual{2,Float64}, ::Array{ForwardDiff.Dual{2,Float64},1})
Closest candidates are:
  add_reg(::Any, ::Any, ::Any) at /home/rick/.julia/v0.5/LightML/src/supervised_learning/baseRegression.jl:146
 in vector_mode_gradient(::LightML.#cost_linear, ::Array{Float64,1}, ::ForwardDiff.GradientConfig{2,Float64,Array{ForwardDiff.Dual{2,Float64},1}}) at /home/rick/.julia/v0.5/ForwardDiff/src/gradient.jl:60
 in gradient(::LightML.#cost_linear, ::Array{Float64,1}, ::ForwardDiff.GradientConfig{2,Float64,Array{ForwardDiff.Dual{2,Float64},1}}) at /home/rick/.julia/v0.5/ForwardDiff/src/gradient.jl:7
 in train!(::LightML.LinearRegression, ::Array{Float64,2}, ::Array{Float64,1}) at /home/rick/.julia/v0.5/LightML/src/supervised_learning/baseRegression.jl:79
 in #test_LinearRegression#5(::String, ::Function) at /home/rick/.julia/v0.5/LightML/src/supervised_learning/baseRegression.jl:159
 in test_LinearRegression() at /home/rick/.julia/v0.5/LightML/src/supervised_learning/baseRegression.jl:157
memoiry commented 7 years ago

I will fix this when I go back,is there any other problem?

rickhg12hs commented 7 years ago

Your package looks like a great learning resource. I've just started looking at it. I do seem to have a knack at making any software fail. When I find errors/issues/curiosities/etc., how would you like me to report them?

memoiry commented 7 years ago

@rickhg12hs Hi, Thanks for your interests, I think the information in your command line is fine. Actually, I recommend downloading the source code directly to get familiar with the source code.

houshuaipeng commented 7 years ago

Six,six,six