Casimir API summary

Optimization

Incremental First Order Oracles - Base classes:

casimir.optim.IncrementalFirstOrderOracle() Base class for incremental first order oracles (IFO).
casimir.optim.SmoothedIncrementalFirstOrderOracle([…]) Base class of smoothed incremental first order oracles.

Optimization Algorithms:

casimir.optim.optimize_ifo(initial_model, …) Minimize a convex function with access to a (smoothed) incremental first order oracle using a primal algorithm.
casimir.optim.CasimirSVRGOptimizer(…[, …]) Implement Casimir (Catalyst with smoothing) or Catalyst outer loop with SVRG as the inner loop.
casimir.optim.SGDOptimizer(initial_model[, …]) Implement the stochastic (sub-)gradient method with various learning rate and averaging schemes.
casimir.optim.SVRGOptimizer(initial_model, …) Implement Stochastic Variance Reduced Gradient (SVRG) with optional smoothing.
casimir.optim.block_coordinate_frank_wolfe_optimize(…) Implement the Block Coordinate Frank-Wolfe (BCFW) algorithm for structured prediction.

Regularization:

casimir.optim.L2Penalty(regularization_parameter) Class representing the L2 regularization penalty.

Data

Classification:

casimir.data.LogisticRegressionIfo

Named Entity Recognition:

casimir.data.named_entity_recognition.create_ner_ifo_from_data
casimir.data.named_entity_recognition.NamedEntityRecognitionIfo
casimir.data.named_entity_recognition.NerDataset
casimir.data.named_entity_recognition.viterbi_decode
casimir.data.named_entity_recognition.viterbi_decode_top_k

Object Localization:

casimir.data.localization.create_loc_ifo_from_data
casimir.data.localization.LocalizationIfo
casimir.data.localization.VocDataset

Structured Prediction Utilities

casimir.structured_prediction_experiment.utils.make_parser
casimir.structured_prediction_experiment.utils.get_output_filename
casimir.structured_prediction_experiment.utils.get_ifo
casimir.structured_prediction_experiment.utils.run_algorithm