pyconstruct.learners.StructuredPerceptron.score¶
-
StructuredPerceptron.
score
(X, Y, Y_pred=None, **kwargs)¶ Compute the score as the average loss over the examples.
This method is needed for scikit-learn estimation in GridSearchCV and other model selection methods.
Parameters: - X (numpy.ndarray) – An array of input examples. The first dimension must be the number of samples.
- Y (numpy.ndarray) – An array of true output objects.
- Y_pred (numpy.ndarray) – An array of predicted object.
Returns: score – The score of the model over the examples.
Return type: float