Skip to content

BoostSRL Deepdive: Starting at the Source

Alexander L. Hayes edited this page Mar 17, 2018 · 8 revisions

BoostSRL Deepdive: Starting at the Source

Java is sometimes referenced as the lingua franca of computer science, but if you are less familiar with large Java projects or the respective source code this tutorial is designed to help you get started with BoostSRL.

Prerequisites:


Step 1: Downloading the source code.

Option 1: Clone the repository with git:

  • master branch:

    git clone https://github.com/boost-starai/BoostSRL.git

  • development branch:

    git clone -b development https://github.com/boost-starai/BoostSRL.git

Option 2: Download a zip

  1. Navigate to the BoostSRL directory.
  2. Find the "Clone or download" button.
  3. Select "Download ZIP".
Gif showing how to download.

Step 2: Importing to Eclipse

For this tutorial we use Eclipse oxygen.

Gif showing how to import the source code into Eclipse.
  1. Start Eclipse.
  2. Select File > Import > Maven > Existing Maven Projects.
  3. Select root directory: BoostSRL/ from the download location.
  4. Click Finish.

Step 3: Tweaking the Build Path

If you run into errors along the lines of "could not find main class", try some of the following steps:

  1. Restart Eclipse
  2. Set src/ as the source directory: on the Project Explorer, right click src/, then go to Build Path > Use as Source Folder

Learning a regression model

Download the "Boston Housing Dataset"

  1. Navigate to Run > Run Configurations.
  2. Right-click "Java Application" and click "New".
  3. Name it Regression_Learning
  4. Under "Main class:", write:
edu.wisc.cs.will.Boosting.Regression.RunBoostedRegressionTrees
  1. Click on the arguments tab (under the name), find "Program arguments:", write:
-l -reg -train "/home/user/Boston-Housing/train_boston/" -target medv -trees 10
  1. Click Run!

Inference using the regression model

  1. Navigate to Run > Run Configurations.
  2. Right-click "Java Application" and click "New".
  3. Name it Regression_Inference
  4. Under "Main class:", write:
edu.wisc.cs.will.Boosting.Regression.RunBoostedRegressionTrees
  1. Click on the arguments tab (under the name, find "Program arguments:", write:
-i -reg -model "/home/user/Boston-Housing/train_boston/models/" -test "/home/user/Boston-Housing/test_boston/" -target medv -trees 10
  1. Click Run!

Learning a Relational Dependency Network for Classification

Download the "UW-CSE" Dataset.

  1. Navigate to Run > Run Configurations.
  2. Right-click "Java Application" and click "New".
  3. Name it Classification_Learning
  4. Under "Main class:", write:
edu.wisc.cs.will.Boosting.RDN.RunBoostedRDN
  1. Click on the arguments tab (under the name), find "Program arguments:", write:
-l -train "/home/user/UW-CSE/train/" -target advisedby -trees 10
  1. Click Run!

Classification Inference with the RDN

  1. Navigate to Run > Run Configurations.
  2. Right-click "Java Application" and click "New".
  3. Name it Classification_Inference
  4. Under "Main class:", write:
edu.wisc.cs.will.Boosting.Regression.RunBoostedRegressionTrees
  1. Click on the arguments tab (under the name, find "Program arguments:", write:
-i -reg -model "/home/user/UW-CSE/train/models/" -test "/home/user/UW-CSE/test/" -target advisedby -trees 10
  1. Click Run!
Clone this wiki locally