Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: LoadError: LoadError: UndefVarError: ASCIIString not defined #29635

Closed
realhippo opened this issue Oct 14, 2018 · 1 comment
Closed

ERROR: LoadError: LoadError: UndefVarError: ASCIIString not defined #29635

realhippo opened this issue Oct 14, 2018 · 1 comment

Comments

@realhippo
Copy link

I am running the following code in Julia 0.6.4 with Jupyter notebook

using RegERMs

# define some toy data (XOR - example)
np = 100
nn = 100
X = [randn(int(np/2),1)+1 randn(int(np/2),1)+1; randn(int(np/2-0.5),1)-1 randn(int(np/2-0.5),1)-1;
     randn(int(nn/2),1)+1 randn(int(nn/2),1)-1; randn(int(nn/2-0.5),1)-1 randn(int(nn/2-0.5),1)+1] # examples with 2 features
y = int(vec([ones(np,1); -ones(nn,1)]))       # binary class values

# use rbf kernel by using mercer map
map = MercerMap(X, :rbf)
X = RegERMs.apply(map)

# choose (linear) SVM as learning algorithm with regularization parameter 0.1
svm = SVM(X, y; λ=0.1)

# get a solution 
model = optimize(svm)

# make predictions and compute accuracy
ybar = predict(model, X)
acc = mean(ybar .== y)

and I am getting the following error;

WARNING: deprecated syntax "abstract Optimizer" at C:\Users\ippok.julia\v0.6\Optim\src\types.jl:2.
Use "abstract type Optimizer end" instead.

WARNING: deprecated syntax "abstract OptimizationResults" at C:\Users\ippok.julia\v0.6\Optim\src\types.jl:65.
Use "abstract type OptimizationResults end" instead.
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near C:\Users\ippok.julia\v0.6\Optim\src\types.jl:66
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near C:\Users\ippok.julia\v0.6\Optim\src\types.jl:66
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near C:\Users\ippok.julia\v0.6\Optim\src\types.jl:84
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near C:\Users\ippok.julia\v0.6\Optim\src\types.jl:84
ERROR: LoadError: LoadError: UndefVarError: ASCIIString not defined

Stacktrace:
[1] include_from_node1(::String) at .\loading.jl:576
[2] include(::String) at .\sysimg.jl:14
[3] include_from_node1(::String) at .\loading.jl:576
[4] include(::String) at .\sysimg.jl:14
[5] anonymous at .<missing>:2
while loading C:\Users\ippok.julia\v0.6\Optim\src\problems\unconstrained.jl, in expression starting on line 10
while loading C:\Users\ippok.julia\v0.6\Optim\src\Optim.jl, in expression starting on line 96
LoadError: Failed to precompile Optim to C:\Users\ippok.julia\lib\v0.6\Optim.ji.
while loading C:\Users\ippok.julia\v0.6\RegERMs\src\RegERMs.jl, in expression starting on line 4

Stacktrace:
[1] compilecache(::String) at .\loading.jl:710
[2] _require(::Symbol) at .\loading.jl:497
[3] require(::Symbol) at .\loading.jl:405
[4] include_from_node1(::String) at .\loading.jl:576
[5] eval(::Module, ::Any) at .\boot.jl:235
[6] _require(::Symbol) at .\loading.jl:490
[7] require(::Symbol) at .\loading.jl:405
[8] include_string(::String, ::String) at .\loading.jl:522
[9] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\ippok.julia\v0.6\IJulia\src\execute_request.jl:193
[10] (::Compat.#inner#6{Array{Any,1},IJulia.#execute_request,Tuple{ZMQ.Socket,IJulia.Msg}})() at C:\Users\ippok.julia\v0.6\Compat\src\Compat.jl:189
[11] eventloop(::ZMQ.Socket) at C:\Users\ippok.julia\v0.6\IJulia\src\eventloop.jl:8
[12] (::IJulia.##13#16)() at .\task.jl:335

Here below the output of Pkg.status() comand

4 required packages:

  • IJulia 1.10.0
  • OrdinaryDiffEq 2.21.2
  • RegERMs 0.0.2
  • Regression 0.3.0
    52 additional packages:
  • ArrayViews 0.7.0
  • BinDeps 0.8.10
  • BinaryProvider 0.3.3
  • Calculus 0.4.1
  • CommonSubexpressions 0.1.0
  • Compat 1.3.0
  • Conda 1.0.2
  • DataStructures 0.8.4
  • DiffBase 0.2.0
  • DiffEqBase 3.13.3
  • DiffEqDiffTools 0.0.2
  • Distances 0.6.0
  • DualNumbers 0.4.0
  • EmpiricalRisks 0.2.4
  • ForwardDiff 0.5.0
  • FunctionWrappers 1.0.0
  • GenericSVD 0.1.0
  • IteratorInterfaceExtensions 0.0.2
  • JSON 0.17.2
  • Juno 0.4.1
  • LineSearches 0.1.5
  • LinearMaps 1.0.4
  • MacroTools 0.4.4
  • MbedTLS 0.5.13
  • Media 0.3.0
  • Missings 0.2.10
  • MuladdMacro 0.0.2
  • NLSolversBase 2.1.3
  • NLsolve 0.9.1
  • NaNMath 0.3.2
  • NamedTuples 4.0.2
  • Nullables 0.0.8
  • Optim 0.4.7
  • Parameters 0.9.2
  • PositiveFactorizations 0.1.0
  • RealInterface 0.0.3
  • RecipesBase 0.3.1
  • RecursiveArrayTools 0.12.4
  • Reexport 0.1.0
  • Requires 0.4.4
  • Roots 0.7.3
  • SHA 0.5.7
  • SimpleTraits 0.6.0
  • SoftGlobalScope 1.0.7
  • SortingAlgorithms 0.2.1
  • SpecialFunctions 0.6.0
  • StaticArrays 0.7.2
  • StatsBase 0.23.1
  • TableTraits 0.2.0
  • URIParser 0.3.1
  • VersionParsing 1.1.3
  • ZMQ 0.6.4
@fredrikekre
Copy link
Member

Please ask questions on https://discourse.julialang.org/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants