2
$\begingroup$

In the example given for sklearn_crfsuite, the parameter space that needs to be passed to a cross_validating class like RandomizedSearchCV is defined as below.

params_space = {
    'c1': scipy.stats.expon(scale=0.5),
    'c2': scipy.stats.expon(scale=0.05),
}

In the example the algorithm that is shown is "lbfgs". Other supported algorithms in sklearn_crfsuite are "l2sgd", "ap", "pa", "arow". How should the variable params_space be defined in those cases?

$\endgroup$
4
$\begingroup$

C1 and C2 are coefficients for L1 and L2 regularization, respectively. You can use the same definition of params_space regardless of the optimization algorithm.

$\endgroup$
0
$\begingroup$

You can check in the documentation which parameters apply to which algorithm. Depending on the algorithm you can optimize different ones, such as c1 and c2 but also epsilon or gamma. https://sklearn-crfsuite.readthedocs.io/en/latest/api.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.