A utility to convert a pretrained Weka REPtree bagging model to JSON format, as used in ObfusX project.
Currently it only supports Weka bagging model with REPtree as the base learner.
- Weka >= 3.8
- Java >= 1.4
Assuming weka.jar
from Weka installation is available in /path/to/weka.jar
:
javac -cp ".:/path/to/weka.jar" REPTreeBagging2JSON.java
This will yield a compiled REPTreeBagging2JSON.class
.
Assuming a Weka REPTree bagging model is saved as bg.model
:
java REPTreeBagging2JSON bg
(without .model
)
This will yield a converted JSON file bg.json
.