Skip to content

whitening bug in CDDetector #4

@ablaom

Description

@ablaom
using Pkg
Pkg.activate(temp=true)
Pkg.add("MLJBase")
Pkg.add("OutlierDetectionPython")

using MLJBase, OutlierDetectionPython

X = (a = rand(10), b = rand(10))
detector = OutlierDetectionPython.CDDetector()

mach = machine(detector, X)
fit!(mach)

# [ Info: Training machine(CDDetector(whitening = true, …), …).
# ┌ Error: Problem fitting the machine machine(CDDetector(whitening = true, …), …).
# └ @ MLJBase ~/.julia/packages/MLJBase/xcS6N/src/machines.jl:683
# [ Info: Running type checks...
# [ Info: Type checks okay.
# ERROR: Python: TypeError: CD.__init__() got an unexpected keyword argument 'whitening'
# Python stacktrace: none
# Stacktrace:
#   [1] pythrow()
#     @ PythonCall ~/.julia/packages/PythonCall/wXfah/src/err.jl:94
(jl_gWxT0t) pkg> st
Status `/private/var/folders/4n/gvbmlhdc8xj973001s6vdyw00000gq/T/jl_gWxT0t/Project.toml`
  [a7f614a8] MLJBase v1.1.0
  [2449c660] OutlierDetectionPython v0.2.2

FYI: You can add generic interface tests using MLJTestInterface.jl, along the lines of this example. These tests would have caught this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions