The original framework is provided by Sebastian Buschjäger and is extended here. Original: https://bitbucket.org/sbuschjaeger/arch-forest/src/master/
code/contains the actual forest and tree code synthesizer discussed in the paperdata/contains scripts and files for running the experiments. Each folder represents one data set used in the experiments. There are a couple of scripts for convienience. Letdatasetbe a dataset of choice, thendataset/init.shcan be used to download and prepare this dataset. Please note, that not all data-sets can be directly downloaded via script (imdb,fact,trec). Please download those manually. The URL can be found in the init-script. Also note, thatwearable-body-posturesneeds some manual editing of the training data, because there is a wrong line in the original file.dataset/trainForest.pyThis trains a new RF with 25 trees on the corresponding dataset usingsklearnand stores the trained model as JSON file indataset/text/forest_25.json. Additionally, the model is exported as python pickle file indataset/text/forsest_25.pklgenerateCode.pyThis script does the actual code generation. It receives 2 parameters. The first parameter is dataset for which code should be generated, the second one is the target architecture (armorintel). This will generate the necessary cpp files for testing and generate a Makefile for compilation in thedataset/cpp/architechture/modelnamefolder.compile.shThis script receives two parameters. It will compile the cpp files for the given dataset (first parameter) and target architecture (second parameter). Please make sure, that the necessary compiler is installed on your system. For intel we useg++. For armarm-linux-gnueabihf-g++is used.run.shThis script receives two parameters. It will run the compiled cpp files for the given dataset (first parameter) and target architecture (second parameter). Results will be printed to std out.runSKLearn.shThis script receives one parameter. It receives a folder and will load the stored SKLearn model file (from thetextfolder) and run it on the corresponding dataset. Results will be printed to std out.init_all.shThis will call theinit.shscript on all foldersgenerate_all.shThis will call thegenerateCode.pyscript on all folders. It receives the target architecture as parametercompile_all.shThis will call thecompile.shscript on all folders.It receives the target architecture as parameterrun_all.shThis will call therun.shscript on all folders.It receives the target architecture as parameter
#How to
# Download the data
cd wine-quality
./init.sh
# Train the model
./trainForest.py
# Generate the code for intel
cd ..
./generatePrefetched.py wine-quality intel
# Compile it
./compile.sh wine-quality intel
# Run it
./collect.sh wine-quality intel