API reference for structured_prediction_experiment#
Command line arguments#
The table below describes command line arguments for the structured prediction experiments,
namely named entity recognition and visual object localization. The main files are respectively
main_ner.py
and main_loc.py
.
The common arguments apply to both these files, which specialized arguments apply only to individual files.
This is followed by arguments unique to each individual main file.
Argument Name |
Type |
Default |
Description |
---|---|---|---|
l2reg |
float |
0.1 |
\(\ell_2\) regularizer which taken to be |
prefix |
str |
|
Prefix applied to all data paths such as |
output-dir |
str |
|
Directory where logged outputs are saved |
algorithm |
str |
|
Which optimization algorithm to use. See below for a detailed description of options and what they imply. |
num_passes |
int |
100 |
Maximum number of passes to make through data |
seed |
float |
1234 |
Random seed to use for reproducibility |
lr |
float |
1.0 |
Learning rate for SGD or SVRG or Casimir-SVRG ( |
lr-t |
float |
1.0 |
Learning rate decay for SGD and ignored by other algorithms. Use learning rate \(\eta_t = \eta_0 / (1 + t/t_0)\) where \(\eta_0\) is specified using |
L |
float |
1.0 |
Gradient Lipschtiz coefficient for use by Casimir-SVRG ( |
smoother |
float |
1.0 |
Initial smoothing coefficient for algorithms that require smoothing. Ignored by algorithms that do not require smoothing |
decay_smoother |
str |
‘none’ |
Type to smoothing decay to be applied. Options are |
K |
int |
5 |
the value of \(K\) for top-\(K\) inference for \(\ell_2\) smoothing |
warm_start |
int |
3 |
Warm start strategy for Casimir-SVRG. |
kappa |
float |
1.0 |
scaling factor on initial Moreau coefficient for Casimir-SVRG variant |
Argument Name |
Type |
Default |
Description |
---|---|---|---|
train_file |
str |
|
Name of text file with training data |
dev_file |
str |
|
Name of text file with development data |
test_file |
str |
|
Name of text file with †esting data |
Argument Name |
Type |
Default |
Description |
---|---|---|---|
object-class |
str |
|
Name of object class to run experiment on |
bbox-dir |
str |
|
Name of directory with bounding box information. See this page on how to obtain this data |
features-dir |
str |
|
Name of directory with bounding box features. See this page on how to obtain this data |
Algorithm |
Description |
---|---|
|
Casimir-SVRG with learning rate specified implicitly via |
|
Casimir-SVRG with learning rate specified direcly as |
|
SVRG with learning rate specified via |
|
SGD with learning rates \(\eta_t = \eta_0 / (1 + t/t_0)\) where \(\eta_0\) is specified using |
|
SGD with constant learning rate specified as \(\eta_0\) and weighted averaging \(\bar w_T = \frac{2}{T(T+1)} \sum_{t=0}^{T} t \cdot w_t\) |
|
SGD with learning rates \(\eta_t = (\lambda t)^{-1}\) where \(\lambda\) is the \(L_2\) regularization and weighted averaging \(\bar w_T = \frac{2}{T(T+1)} \sum_{t=0}^{T} t \cdot w_t\) |
|
Block Coordinate Frank Wolfe optimization for Structural SVMs. |