mljs / ml

Machine learning tools in JavaScript
MIT License
2.63k stars 210 forks source link

[Enhancement] IsolationForest is in the roadmap? #102

Open kreynaldo opened 6 years ago

kreynaldo commented 6 years ago

I can't find a good implementation of iForest in JavaScript. I need it for an anomaly detection system, and perhaps you already have it in your roadmap.

stropitek commented 6 years ago

Hello!

No iForest in not on our roadmap (to be honest we do not really have a roadmap, we just do things as we need them 😄)

You're welcome to build your own implementation, we'd gladly include it to the ml project if you'd like to. Otherwise you can check out libsvm-js, we use it for classification but it also has a "one class" mode that is well-suited for anomaly detection.

kreynaldo commented 6 years ago

Ok, I'll take look at your code and try to replicate your standards before contributing a solution. I think that IsolationForest is similar to RandomForest (which you already have included). The hypotesis behind IsolationForest is that anomalies are isolated faster (shorter paths on average), and outperform other known algorithms for the same purpose in many respects.

stropitek commented 6 years ago

Cool! Would you like us to prepare a repo with some boilerplate on the mljs organization (with our up-to-date eslint rules, testing environment etc...), or would you prefer to start a repo on your own account?

kreynaldo commented 6 years ago

No needed, I'll start with some existing java implementations and I'll come back to you when I've figure it out.