Open enricopal opened 7 years ago
Hi Enrico,
Currently the check_estimator
function takes a class, not an instance, so you need to run
check_estimator(StructuredPerceptron)
instead. We will add support for testing individual instances in the future, though.
Hello, I was hoping to reuse the model selection routines of the Scikitlearn API (grid search CV and the like), but it appears that neither HMM nor the StructuredPerceptron are considered to be valid estimator (http://scikit-learn.org/stable/developers/contributing.html#rolling-your-own-estimator). By looking through the source code, everything seems to be abiding scikitlearn rules, but if I try:
from seqlearn.perceptron import StructuredPerceptron from sklearn.utils.estimator_checks import check_estimator model = StructuredPerceptron() check_estimator(model)
I get: AttributeError: 'StructuredPerceptron' object has no attribute 'name'
Any clue on how to fix this compatibility issue? Thanks a lot in advance, Enrico