Program Interface

A program must conform to the program interface of its domain.

The program can contain as many files as you'd like, so long as there is a run executable, which is the entry point.

There are two types of domains, supervised-learning and performing (read more about domains). The programs interfaces for each is described below

The program will be run in the current directory. Feel free to write to the current directory.


Supervised learning

In supervised learning, there are two phases, learn and predict. Here's an example of how we invoke your program:
./run construct
./run setHyperparameter 0.1 # (if automatic hyperparameter tuning is enabled)
./run learn path/to/training/datashard
./run predict path/to/test/datashard path/to/predictions
Here's what the four options should do:
  • construct: allows your program to do any necessary initialization. If your program consists of source code, this is where it should compile itself.
  • setHyperparameter value: set the hyperparameter to value, which will take on values in { 0.01, 0.1, 1, 10, 100 }. This command will be invoked only if you select automatic hyperparameter tuning. Most likely, when this is called, your program will save value to disk and read it during learn.
  • learn datashardPath: use examples in datashardPath for training. Your program will probably serialize the learned model to disk (in the current directory is fine).
  • predict datashardPath predictionsPath: output predictions of the learned model on examples from datashardPath to predictionsPath. Your program will probably read in the learned model here.


Performing

In performing, there is only one phase perform. This includes tasks like unsupervised learning and optimization. Here's an example of how we invoke your program:
./run construct
./run perform path/to/raw/datashard path/to/output
Here's what the two options should do:
  • construct: allows your program to do any necessary initialization. If your program consists of source code, this is where it should compile itself.
  • perform datashardPath outputPath: process the examples in datashardPath (e.g., clustering, segmentation, etc.), and write the output to outputPath.