pyconstruct.learners.BlockCoordinateFrankWolfe¶
-
class
pyconstruct.learners.
BlockCoordinateFrankWolfe
(domain=None, model=None, structured_loss=None, dataset_size=1, alpha=0.0001, **kwargs)¶ Learner using the Block-Coordinate Frank-Wolfe algorithm [1].
This implementation is still a bit experimental. Should work fine but still has not been made parallel, so it will take much more than necessary on most datasets. Coming soon also improvements from [2].
Parameters: - domain (BaseDomain) – The domain of the data.
- structured_loss (function (y, y) -> float) – The structured loss to compute on the objects.
- dataset_size (int) – A hint on the size of the dataset. May improve performance.
- alpha (float) – The regularization coefficient.
References
[1] Lacoste-Julien, Simon, et al. “Block-Coordinate Frank-Wolfe Optimization for Structural SVMs.” ICML 2013 International Conference on Machine Learning. 2013. [2] Osokin, Anton, et al. “Minding the Gaps for Block Frank-Wolfe Optimization of Structured SVMs.” Proceedings of Machine Learning Research. Proceedings of the International Conference on Machine Learning (ICML 2016). 2016. Methods
decision_function
(X, Y, **kwargs)fit
(X, Y[, Y_pred])Updates the current model with a mini-batch (X, Y). get_params
([deep])Get parameters for this estimator. loss
(X, Y_true, Y_pred)partial_fit
(X, Y[, Y_pred])Updates the current model with a mini-batch (X, Y). phi
(X, Y, **kwargs)Computes the feature vector for the given input and output objects. predict
(X, *args, **kwargs)Computes the prediction of the current model for the given input. score
(X, Y[, Y_pred])Compute the score as the average loss over the examples. set_params
(**params)Set the parameters of this estimator. Attributes
dual_gap