# ManifoldLearning methods broken?

**URL:** https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058
**Category:** General Usage
**Tags:** question, package, plotting
**Created:** [February 14, 2018, 3:29pm UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058 "2018-02-14T15:29:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![burfel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/burfel/32/3314_2.png) [@burfel](https://discourse.julialang.org/u/burfel)
#### Post date: [February 14, 2018, 3:29pm UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058/1 "2018-02-14T15:29:19Z")

</div>

I am trying to get the methods in the _ManifoldLearning.jl_ package running and get the following error messages… I use the sample code from the documentation.

```julia
# Isomap
Y_Isomap = transform(Isomap,data_array; k=12,d=2)

```

> MethodError: no method matching Dict(::Array{Int64,1}, ::UnitRange{Int64})  
> Closest candidates are:  
> Dict(::Any) at dict.jl:144  
> #transform#6(::Int64, ::Int64, ::Function, ::Type{ManifoldLearning.Isomap}, ::Array{Float64,2}) at isomap.jl:59  
> (::MultivariateStats.#kw##transform)(::Array{Any,1}, ::MultivariateStats.#transform, ::Type{ManifoldLearning.Isomap}, ::Array{Float64,2}) at :0  
> include\_string(::String, ::String) at loading.jl:522  
> include\_string(::String, ::String, ::Int64) at eval.jl:30  
> include\_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34  
> (::Atom.##100#105{String,Int64,String})() at eval.jl:75  
> withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30  
> withpath(::Function, ::String) at eval.jl:38  
> hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:59  
> macro expansion at eval.jl:73 [inlined]  
> (::Atom.##98#103{Dict{String,Any}})() at task.jl:80

```julia
# Diffusion maps
Y_DiffMap = transform(DiffMap, data_array; d=2, t=1, ɛ=1.0)

```

> UndefVarError: transform! not defined  
> #transform#19(::Int64, ::Int64, ::Float64, ::Function, ::Type{ManifoldLearning.DiffMap}, ::Array{Float64,2}) at diffmaps.jl:37  
> (::MultivariateStats.#kw##transform)(::Array{Any,1}, ::MultivariateStats.#transform, ::Type{ManifoldLearning.DiffMap}, ::Array{Float64,2}) at :0  
> include\_string(::String, ::String) at loading.jl:522  
> include\_string(::String, ::String, ::Int64) at eval.jl:30  
> include\_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34  
> (::Atom.##100#105{String,Int64,String})() at eval.jl:75  
> withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30  
> withpath(::Function, ::String) at eval.jl:38  
> hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:59  
> macro expansion at eval.jl:73 [inlined]  
> (::Atom.##98#103{Dict{String,Any}})() at task.jl:80

```julia
# Local linear embedding
Y_LLE = transform(LLE, data_array; k = 12, d = 2)

```

> MethodError: no method matching Dict(::Array{Int64,1}, ::UnitRange{Int64})  
> Closest candidates are:  
> Dict(::Any) at dict.jl:144  
> #transform#12(::Int64, ::Int64, ::Function, ::Type{ManifoldLearning.LLE}, ::Array{Float64,2}) at lle.jl:51  
> (::MultivariateStats.#kw##transform)(::Array{Any,1}, ::MultivariateStats.#transform, ::Type{ManifoldLearning.LLE}, ::Array{Float64,2}) at :0  
> include\_string(::String, ::String) at loading.jl:522  
> include\_string(::String, ::String, ::Int64) at eval.jl:30  
> include\_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34  
> (::Atom.##100#105{String,Int64,String})() at eval.jl:75  
> withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30  
> withpath(::Function, ::String) at eval.jl:38  
> hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:59  
> macro expansion at eval.jl:73 [inlined]  
> (::Atom.##98#103{Dict{String,Any}})() at task.jl:80

```julia
# Hessian Eigenmaps transformation
Y_HLLE = transform(HLLE, data_array; k = 12, d = 2)

```

> UndefVarError: int not defined  
> #transform#9(::Int64, ::Int64, ::Function, ::Type{ManifoldLearning.HLLE}, ::Array{Float64,2}) at hlle.jl:44  
> (::MultivariateStats.#kw##transform)(::Array{Any,1}, ::MultivariateStats.#transform, ::Type{ManifoldLearning.HLLE}, ::Array{Float64,2}) at :0  
> include\_string(::String, ::String) at loading.jl:522  
> include\_string(::String, ::String, ::Int64) at eval.jl:30  
> include\_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34  
> (::Atom.##100#105{String,Int64,String})() at eval.jl:75  
> withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30  
> withpath(::Function, ::String) at eval.jl:38  
> hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:59  
> macro expansion at eval.jl:73 [inlined]  
> (::Atom.##98#103{Dict{String,Any}})() at task.jl:80

And when I try to plot it, I get

`scatter(Y_LEM, title="LEM - ManifoldLearning")`

> No user recipe defined for ManifoldLearning.LEM  
> macro expansion at series.jl:132 [inlined]  
> apply\_recipe(::Dict{Symbol,Any}, ::Type{Plots.SliceIt}, ::Void, ::ManifoldLearning.LEM, ::Void) at RecipesBase.jl:287  
> \_process\_userrecipes(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{ManifoldLearning.LEM}) at pipeline.jl:81  
> \_plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{ManifoldLearning.LEM}) at plot.jl:177  
> (::RecipesBase.#kw##plot)(::Array{Any,1}, ::RecipesBase.#plot, ::ManifoldLearning.LEM) at :0  
> #scatter#632(::Array{Any,1}, ::Function, ::ManifoldLearning.LEM, ::Vararg{ManifoldLearning.LEM,N} where N) at RecipesBase.jl:381  
> (::Plots.#kw##scatter)(::Array{Any,1}, ::Plots.#scatter, ::ManifoldLearning.LEM, ::Vararg{ManifoldLearning.LEM,N} where N) at :0  
> include\_string(::String, ::String) at loading.jl:522  
> include\_string(::String, ::String, ::Int64) at eval.jl:30  
> include\_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34  
> (::Atom.##100#105{String,Int64,String})() at eval.jl:75  
> withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30  
> withpath(::Function, ::String) at eval.jl:38  
> hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:59  
> macro expansion at eval.jl:73 [inlined]  
> (::Atom.##98#103{Dict{String,Any}})() at task.jl:80

my data\_array is a 547×96 Array{Float64,2}.

Help much appreciated!

---

<div class="post-metadata">

### Author: ![burfel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/burfel/32/3314_2.png) [@burfel](https://discourse.julialang.org/u/burfel)
#### Post date: [February 21, 2018, 1:23pm UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058/2 "2018-02-21T13:23:04Z")

</div>

Are these methods working for anyone?

---

<div class="post-metadata">

### Author: ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)
#### Post date: [February 21, 2018, 1:58pm UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058/3 "2018-02-21T13:58:55Z")

</div>

These might be helpful

```julia
int(x) = Int(x);
base.Dict(x::Array{Int64, 1}, y::UnitRange{Int64}) = Dict(x=>y);
```

---

<div class="post-metadata">

### Author: ![burfel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/burfel/32/3314_2.png) [@burfel](https://discourse.julialang.org/u/burfel)
#### Post date: [February 21, 2018, 4:26pm UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058/4 "2018-02-21T16:26:52Z")

</div>

Could you please elaborate a bit. It is still returning the same error messages.  
If you get any of the methods above running, could you please provide some sample code? Thanks.

---

<div class="post-metadata">

### Author: ![pegger0709](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pegger0709/32/1811_2.png) [@pegger0709](https://discourse.julialang.org/u/pegger0709)
#### Post date: [June 19, 2018, 7:48am UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058/5 "2018-06-19T07:48:20Z")

</div>

I’m having the same problem as burfel (I’m using julia v0.6.3). I tried y4lu’s suggested fix, and that didn’t help. Are others having the same problem? Should this be raised in a different forum?

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [June 19, 2018, 8:08am UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058/6 "2018-06-19T08:08:09Z")

</div>

You can try opening an issue at the repo

[https://github.com/wildart/ManifoldLearning.jl](https://github.com/wildart/ManifoldLearning.jl)

but there seems to be no recent activity so it may be abandonned.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [June 19, 2018, 8:20am UTC](https://discourse.julialang.org/t/manifoldlearning-methods-broken/9058/7 "2018-06-19T08:20:29Z")

</div>

It works on the master branch.
