benhamner / MachineLearning.jl

Julia Machine Learning library
Other
116 stars 28 forks source link

Methods not defined in Julia 0.4 #8

Open tcfuji opened 9 years ago

tcfuji commented 9 years ago

I just installed the bleeding edge version of Julia and this package seems to have problems calling methods. For example:

model = [2.0, 1.0, -1.0]
X_train = randn(1000, 3)
y_train = int(map(x -> x > 0, X_train*model))
net = fit(X_train, y_train, logistic_regression_options())
sample = [1.0, 0.0, 0.0]
println("Ground truth: ", int(dot(sample,model)>0))
println("Prediction:   ", predict(net, sample))

gives this:

logistic_regression_options not defined
while loading In[3], in expression starting on line 4

This is the output when executing using MachineLearning:

Warning: imported binding for Date overwritten in module Datetime
Warning: imported binding for DateTime overwritten in module Datetime
Warning: Method definition now()
@grisu_ccall not defined
while loading /Users/tf/.julia/Gadfly/src/format.jl, in expression starting on line 56
while loading /Users/tf/.julia/Gadfly/src/Gadfly.jl, in expression starting on line 50
while loading /Users/tf/.julia/MachineLearning/src/MachineLearning.jl, in expression starting on line 2
while loading In[1], in expression starting on line 1

 in include at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in include_from_node1 at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in include at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in include_from_node1 at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in reload_path at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in _require at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in require at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib (repeats 2 times)
 in include at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in include_from_node1 at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in reload_path at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in _require at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib
 in require at /usr/local/Cellar/julia/HEAD/lib/julia/sys.dylib (repeats 2 times)

 in module Dates at dates/conversions.jl:21 overwritten in module Datetime at /Users/tf/.julia/Datetime/src/Datetime.jl:294.