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

Julia Package #8

Open
msimms opened this issue Dec 10, 2020 · 3 comments
Open

Julia Package #8

msimms opened this issue Dec 10, 2020 · 3 comments

Comments

@msimms
Copy link
Owner

msimms commented Dec 10, 2020

Would like to make this so it can be installed via the Julia package manager.

@davnn
Copy link

davnn commented Mar 17, 2022

Hi Mike,
would you be interested in porting the Julia version to our OutlierDetectionJL organization? There will be an OutlierDetectionTrees.jl package that would host the algorithm and it will be fully integrated with MLJ.

@msimms
Copy link
Owner Author

msimms commented Mar 19, 2022

I'm curious. I'll take a look at what you've got.

@davnn
Copy link

davnn commented Mar 19, 2022

I did a first try to implement it at OutlierDetectionTrees.jl. I changed the implementation a little bit to work without explicit feature names, check out IsolationForest.jl.

Only a very small wrapper is necessary to make it work with MLJ and OutlierDetection.jl, see models/IForest.jl.

A small usage example:

import Pkg

Pkg.activate(;temp=true)

Pkg.add("MLJ")
Pkg.add("OutlierDetection")
Pkg.add("OutlierDetectionData")
Pkg.develop(;url="https://github.com/OutlierDetectionJL/OutlierDetectionTrees.jl")

using MLJ
using OutlierDetection
using OutlierDetectionData
using OutlierDetectionTrees

X, y = ODDS.load("thyroid")
train, test = partition(eachindex(y), 0.5, stratify=y, shuffle=true)
detector = ProbabilisticDetector(IForestDetector())
mach = machine(detector, X)
fit!(mach, rows=train)
ŷ = predict(mach, rows=test)
auc(ŷ, y[test])

The results do not appear to be correct, yet. Once the bugs are fixed it should be ready to be registered with MLJ's model registry. What do you think?

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