Home > Net >  Missing import from Weka dependency
Missing import from Weka dependency

Time:11-23

Trying to use Isolation Forest from Weka. Added this version to pom: https://mvnrepository.com/artifact/nz.ac.waikato.cms.weka/weka-dev/3.9.5

Tried to import: weka.classifiers.misc.IsolationForest like in doc https://weka.sourceforge.io/doc.packages/isolationForest/weka/classifiers/misc/IsolationForest.html

Opened some .jars stable/dev. No iForest to find (not in misc or elsewehere). Neither in my .m2 .jar.

Weka repo https://svn.cms.waikato.ac.nz/svn/weka/tags/dev-3-9-5/packages/internal/isolationForest/src/main/java/weka/classifiers/misc/IsolationForest.java

What am i missing? Thanks for any help in advance!

CodePudding user response:

IsolationForest is part of a Weka package and not part of the core Weka artifact (Weka's package manager loads Weka packages with its own ClassLoader - as long as you have the packages installed).

If you want to use this class directly, you need to add the IsolationForest artifact to your pom.xml:

<dependency>
  <groupId>nz.ac.waikato.cms.weka</groupId>
  <artifactId>isolationForest</artifactId>
  <version>1.0.2</version>
</dependency>
  • Related