public class WekaTrainer
extends java.lang.Object
This is only needed in Checkpoint 5.
CAUTION: trainingpaths.json will not exist in the app or during official grading.
Constructor and Description |
---|
WekaTrainer() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Entry point to allow running this class outside Android.
|
public static void main(java.lang.String[] args) throws java.lang.Exception
CAUTION: When running outside of Android or Robolectric, it is not possible to use Android classes or any methods that rely on them. When running inside Android, it is not possible to access the development computer's filesystem. This method should only be used to train the model which gets baked into the app; it must not be called from app code.
args
- command-line arguments (unused)java.io.IOException
- if something goes wrong loading the JSON file or saving the modeljava.lang.Exception
- if something goes wrong serializing the classifier