#Creating the CRF model
crf = CRF(algorithm='lbfgs',
c1=0.1,
c2=0.1,
max_iterations=100,
all_possible_transitions=False)
#We predcit using the same 5 fold cross validation
pred = cross_val_predict(estimator=crf, X=X, y=y, cv=5)
出现:AttributeError: ‘CRF’ object has no attribute 'keep_tempfiles’
解决方法:
pip install -U 'scikit-learn<0.24'