memoiry / lightml.jl Goto Github PK
View Code? Open in Web Editor NEWMinimal and clean examples of machine learning algorithms implemented in Julia
License: Other
Minimal and clean examples of machine learning algorithms implemented in Julia
License: Other
Is this project abandoned? Any plans for 1.0?
The use of abstract types in the types of fields, as seen here:
https://github.com/memoiry/lightML.jl/blob/master/PCA.jl#L4
is bad for performance. You should either hard code the concrete type or parameterize them.
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
julia 0.7 , Follow the reference method.
but input using LightML.There is an error:
julia> using LightML
[ Info: Precompiling LightML [21c72615-c80e-5f28-8897-21b7f06a9402]
┌ Warning: Deprecated syntax try without catch or finally
at /root/.julia/packages/Gadfly/ojGNo/src/Gadfly.jl:971.
└ @ ~/.julia/packages/Gadfly/ojGNo/src/Gadfly.jl:971
┌ Warning: Deprecated syntax try without catch or finally
at /root/.julia/packages/Gadfly/ojGNo/src/Gadfly.jl:980.
└ @ ~/.julia/packages/Gadfly/ojGNo/src/Gadfly.jl:980
┌ Warning: Deprecated syntax try without catch or finally
at /root/.julia/packages/Compose/y7cU7/src/Compose.jl:207.
└ @ ~/.julia/packages/Compose/y7cU7/src/Compose.jl:207
WARNING: importing deprecated binding Base.Nullable into Compose.
ERROR: LoadError: LoadError: TypeError: in Type{...} expression, expected UnionAll, got typeof(Base.Nullable)
Stacktrace:
[1] top-level scope at none:0
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1038
[4] include at ./sysimg.jl:29 [inlined]
[5] include(::String) at /root/.julia/packages/Compose/y7cU7/src/Compose.jl:3
[6] top-level scope at none:0
[7] include at ./boot.jl:317 [inlined]
[8] include_relative(::Module, ::String) at ./loading.jl:1038
[9] include(::Module, ::String) at ./sysimg.jl:29
[10] top-level scope at none:2
[11] eval at ./boot.jl:319 [inlined]
[12] eval(::Expr) at ./client.jl:399
[13] top-level scope at ./none:3
in expression starting at /root/.julia/packages/Compose/y7cU7/src/measure.jl:133
in expression starting at /root/.julia/packages/Compose/y7cU7/src/Compose.jl:69
ERROR: LoadError: Failed to precompile Compose [a81c6b42-2e10-5240-aca2-a61377ecd94b] to /root/.julia/compiled/v0.7/Compose/sbiEw.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1038
[10] include(::Module, ::String) at ./sysimg.jl:29
[11] top-level scope at none:2
[12] eval at ./boot.jl:319 [inlined]
[13] eval(::Expr) at ./client.jl:399
[14] top-level scope at ./none:3
in expression starting at /root/.julia/packages/Gadfly/ojGNo/src/Gadfly.jl:7
ERROR: LoadError: Failed to precompile Gadfly [c91e804a-d5a3-530f-b6f0-dfbca275c004] to /root/.julia/compiled/v0.7/Gadfly/DvECm.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1038
[10] include(::Module, ::String) at ./sysimg.jl:29
[11] top-level scope at none:2
[12] eval at ./boot.jl:319 [inlined]
[13] eval(::Expr) at ./client.jl:399
[14] top-level scope at ./none:3
in expression starting at /root/.julia/dev/LightML/src/LightML.jl:4
ERROR: Failed to precompile LightML [21c72615-c80e-5f28-8897-21b7f06a9402] to /root/.julia/compiled/v0.7/LightML/hSDel.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
How can I do? Thank you!!
@memoiry, thanks for doing this. I was wondering if there are any plans to wrap this code such that it could be used as a module? I can assist if that is the intent.
It's expected that there are some prerequisites, and it would be nice if there were no errors when first trying to use LightML.jl
.
My Pkg.clone(...
completed without error, but the first using LightML
failed after building several packages and then couldn't locate sklearn
.
$ ./julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.1 (2017-03-05 13:25 UTC)
_/ |\__'_|_|_|\__'_| |
|__/ | x86_64-redhat-linux
julia> Pkg.clone("https://github.com/memoiry/LightML.jl")
INFO: Cloning LightML from https://github.com/memoiry/LightML.jl
INFO: Computing changes...
INFO: Cloning cache of AxisAlgorithms from https://github.com/timholy/AxisAlgorithms.jl.git
INFO: Cloning cache of Clustering from https://github.com/JuliaStats/Clustering.jl.git
INFO: Cloning cache of Compose from https://github.com/GiovineItalia/Compose.jl.git
INFO: Cloning cache of Conda from https://github.com/JuliaPy/Conda.jl.git
INFO: Cloning cache of Contour from https://github.com/tlycken/Contour.jl.git
INFO: Cloning cache of DiffBase from https://github.com/JuliaDiff/DiffBase.jl.git
INFO: Cloning cache of Distances from https://github.com/JuliaStats/Distances.jl.git
INFO: Cloning cache of DualNumbers from https://github.com/JuliaDiff/DualNumbers.jl.git
INFO: Cloning cache of FixedSizeArrays from https://github.com/SimonDanisch/FixedSizeArrays.jl.git
INFO: Cloning cache of ForwardDiff from https://github.com/JuliaDiff/ForwardDiff.jl.git
INFO: Cloning cache of Gadfly from https://github.com/GiovineItalia/Gadfly.jl.git
INFO: Cloning cache of Hexagons from https://github.com/GiovineItalia/Hexagons.jl.git
INFO: Cloning cache of Interpolations from https://github.com/JuliaMath/Interpolations.jl.git
INFO: Cloning cache of Iterators from https://github.com/JuliaCollections/Iterators.jl.git
INFO: Cloning cache of KernelDensity from https://github.com/JuliaStats/KernelDensity.jl.git
INFO: Cloning cache of LaTeXStrings from https://github.com/stevengj/LaTeXStrings.jl.git
INFO: Cloning cache of LineSearches from https://github.com/JuliaNLSolvers/LineSearches.jl.git
INFO: Cloning cache of Loess from https://github.com/JuliaStats/Loess.jl.git
INFO: Cloning cache of Measures from https://github.com/JuliaGraphics/Measures.jl.git
INFO: Cloning cache of NaNMath from https://github.com/mlubin/NaNMath.jl.git
INFO: Cloning cache of NearestNeighbors from https://github.com/KristofferC/NearestNeighbors.jl.git
INFO: Cloning cache of Optim from https://github.com/JuliaNLSolvers/Optim.jl.git
INFO: Cloning cache of PositiveFactorizations from https://github.com/timholy/PositiveFactorizations.jl.git
INFO: Cloning cache of PyCall from https://github.com/JuliaPy/PyCall.jl.git
INFO: Cloning cache of PyPlot from https://github.com/JuliaPy/PyPlot.jl.git
INFO: Cloning cache of Ratios from https://github.com/timholy/Ratios.jl.git
INFO: Cloning cache of Showoff from https://github.com/JuliaGraphics/Showoff.jl.git
INFO: Cloning cache of StaticArrays from https://github.com/JuliaArrays/StaticArrays.jl.git
INFO: Cloning cache of WoodburyMatrices from https://github.com/timholy/WoodburyMatrices.jl.git
INFO: Installing AxisAlgorithms v0.1.6
INFO: Installing Clustering v0.7.0
INFO: Installing ColorTypes v0.3.5
INFO: Installing Colors v0.7.3
INFO: Installing Compose v0.4.5
INFO: Installing Conda v0.5.2
INFO: Installing Contour v0.2.0
INFO: Installing DiffBase v0.1.0
INFO: Installing Distances v0.4.1
INFO: Installing DualNumbers v0.3.0
INFO: Installing FixedPointNumbers v0.3.5
INFO: Installing FixedSizeArrays v0.2.5
INFO: Installing ForwardDiff v0.4.1
INFO: Installing Gadfly v0.6.0
INFO: Installing Hexagons v0.0.4
INFO: Installing Hiccup v0.1.1
INFO: Installing Interpolations v0.3.8
INFO: Installing Iterators v0.3.0
INFO: Installing JSON v0.8.3
INFO: Installing Juno v0.2.7
INFO: Installing KernelDensity v0.3.2
INFO: Installing LaTeXStrings v0.2.0
INFO: Installing LineSearches v0.1.5
INFO: Installing Loess v0.1.0
INFO: Installing MacroTools v0.3.6
INFO: Installing Measures v0.0.3
INFO: Installing Media v0.2.5
INFO: Installing NaNMath v0.2.4
INFO: Installing NearestNeighbors v0.2.0
INFO: Installing Optim v0.7.8
INFO: Installing PositiveFactorizations v0.0.4
INFO: Installing PyCall v1.11.0
INFO: Installing PyPlot v2.3.1
INFO: Installing Ratios v0.0.4
INFO: Installing Showoff v0.0.7
INFO: Installing StaticArrays v0.3.0
INFO: Installing WoodburyMatrices v0.2.2
INFO: Building Conda
INFO: Building Rmath
INFO: Building PyCall
INFO: PyCall is using python (Python 2.7.13) at /usr/bin/python, libpython = /usr/lib64/libpython2.7
INFO: /home/rick/.julia/v0.5/PyCall/deps/deps.jl has been updated
INFO: /home/rick/.julia/v0.5/PyCall/deps/PYTHON has been updated
julia> using LightML
INFO: Precompiling module Gadfly.
INFO: Precompiling module PyCall.
INFO: Precompiling module PyPlot.
/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
INFO: Precompiling module Clustering.
ERROR: LoadError: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('No module named sklearn.datasets',)
in pyerr_check at /home/rick/.julia/v0.5/PyCall/src/exception.jl:56 [inlined]
in pyerr_check at /home/rick/.julia/v0.5/PyCall/src/exception.jl:61 [inlined]
in macro expansion at /home/rick/.julia/v0.5/PyCall/src/exception.jl:81 [inlined]
in pyimport(::String) at /home/rick/.julia/v0.5/PyCall/src/PyCall.jl:392
in include_from_node1(::String) at ./loading.jl:488
in eval(::Module, ::Any) at ./boot.jl:234
in require(::Symbol) at ./loading.jl:415
while loading /home/rick/.julia/v0.5/LightML/src/LightML.jl, in expression starting on line 432
julia>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.