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

Implement DBSCAN as a Static transformer? #36

Closed
ablaom opened this issue Oct 3, 2021 · 1 comment
Closed

Implement DBSCAN as a Static transformer? #36

ablaom opened this issue Oct 3, 2021 · 1 comment

Comments

@ablaom
Copy link
Member

ablaom commented Oct 3, 2021

using MLJ
M = @load DBSCAN
model = M()
X, _ = make_moons()
mach = machine(m, X)|> fit!

julia> transform(mach, X)
ERROR: MethodError: no method matching transform(::MLJScikitLearnInterface.DBSCAN, ::PyCall.PyObject, ::Tables.MatrixTable{Matrix{Float64}})
Closest candidates are:
  transform(::Union{MLJIteration.DeterministicIteratedModel{M}, MLJIteration.ProbabilisticIteratedModel{M}} where M, ::Any, ::Any) at /Users/anthony/.julia/packages/MLJIteration/Twn0E/src/core.jl:129
  transform(::Machine{var"#s471", C} where {var"#s471"<:Static, C}, ::Any, ::Any...) at /Users/anthony/.julia/packages/MLJBase/W4gFl/src/operations.jl:96
  transform(::Union{Composite, Surrogate}, ::Any, ::Any) at /Users/anthony/.julia/packages/MLJBase/W4gFl/src/operations.jl:122
  ...
Stacktrace:
 [1] transform(mach::Machine{MLJScikitLearnInterface.DBSCAN, true}, Xraw::Tables.MatrixTable{Matrix{Float64}})
   @ MLJBase ~/.julia/packages/MLJBase/W4gFl/src/operations.jl:88
 [2] top-level scope
   @ REPL[23]:1

Looks to me like transform is not implemented (confirmed by info(m)) and that there should be a line like the following one for the Birch transformer

in the code block defining BDSCAN (in the same file).

@ablaom ablaom added the bug Something isn't working label Oct 3, 2021
@ablaom
Copy link
Member Author

ablaom commented Oct 4, 2021

Oops. I remember why this isn't implemented. DBSCAN only delivers cluster labels for training data. So this should be re-conceived as a Static transformer.

See discussion at JuliaAI/MLJClusteringInterface.jl#11, which will probably render this issue low priority.

@ablaom ablaom removed the bug Something isn't working label Oct 4, 2021
@ablaom ablaom changed the title Problem with DBSCAN Implement DBSCAN as a Static transformer Oct 4, 2021
@ablaom ablaom added the bug Something isn't working label Oct 4, 2021
@ablaom ablaom removed the bug Something isn't working label Mar 3, 2022
@ablaom ablaom changed the title Implement DBSCAN as a Static transformer Implement DBSCAN as a Static transformer? Mar 3, 2022
@ablaom ablaom closed this as completed Aug 31, 2022
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

1 participant