Error warning when using “qiime sample-classifier classify-samples”

Hello,
As title!
Command lines:
qiime sample-classifier classify-samples
--i-table slaiva-filtered-table.qza
--m-metadata-file saliva-sample-metadata.txt
--m-metadata-column Status
--p-optimize-feature-selection
--p-parameter-tuning
--p-estimator RandomForestClassifier
--p-n-estimators 100
--o-visualization prediction-saliva-status.qzv

Plugin error from sample-classifier:[<a class="attachment" href="//forum-qiime2-org.s3-us-west-slaiva-filtered-table.qza (26.0 KB)
saliva-sample-metadata.txt (606 Bytes)

Cannot have number of splits n_splits=5 greater than the number of samples: 4.

I have enclosed the files used in the attached! Thanks for your help!

Hi @tengfey,
This error is occurring because you only have 3 samples per category but the default cross-validation is 5-fold (meaning that the input samples are split into 5 subsets for model building and validation), so this can’t be done. You can change this number by using the option --p-cv.

1 Like

It looks like you have a total of 6 samples. That is going to be entirely insufficient for any kind of learning model. The methods in q2-sample-classifier will not give meaningful results if you have so few samples. As a rule of thumb I would recommend at least ~50 samples before trying to use any of these methods.

1 Like

Many thanks for your prompt reply and useful suggestion.

1 Like

Many thanks for your reply!

1 Like

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