Feature classifier for the moving pictures tutorial doesn't work with latest version of scikit-learn 0.20.3

I am using qiime2 2019.4 in conda. I was going over the moving pictures tutorials for the taxonomy. I ran the following commands:
qiime feature-classifier classify-sklearn \

--i-classifier gg-13-8-99-515-806-nb-classifier.qza
--i-reads rep-seqs.qza
--o-classification taxonomy.qza

qiime metadata tabulate
--m-input-file taxonomy.qza
--o-visualization taxonomy.qzv

The error message I received:
The scikit-learn version (0.21.2) used to generate this artifact does not match the current version of scikit-learn installed (0.21.3). Please retrain your classifier for your current deployment to prevent data-corruption errors.

I can't figure out how to retrain the greengenes 99% that is used in this tutorial with the new version of scikit-learn....I have seen similar topics in the forum but the opposite case, where the classifier was trained for scikit-learn 20.2 and the person had installed a version 19, so they only had to update the version. I can't figure out how to retrain the classifier using the newer version of scikit-learn 20.3
thank you

Have you seen the QIIME 2 tutorials? There is one about training a feature classifier.

That is your other option: to downgrade scikit-learn to the correct version. Something like this should work from within your activated QIIME 2 environment (but see the conda documentation if this does not work):

conda install scikit-learn=0.21.2

then confirm that you have the desired version installed with this command:

conda list 'scikit-learn'

I tried to reinstall the scikit-learn version that works with the tutorial…it didn’t work, it is still said that the scikit-learn version is 0.21.3. I went over the tutorial to retrain the classifier using the dataset from the tutorial. When I run the script to train the classifier it returns the following error:
Plugin error from feature-classifier:

fit_classifier_naive_bayes() got an unexpected keyword argument 'feat_ext__non_negative’

Debug info has been saved to /var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/qiime2-q2cli-err-o8pljva4.log

Not sure how to fix the error!!

Hi @nietof,
Based on the info provided, I am not sure how to fix it either! Could you please provide:

  1. the full command that you used
  2. the full error message (see the “debug info” log file).


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.