whokaryote icon indicating copy to clipboard operation
whokaryote copied to clipboard

AttributeError: 'DecisionTreeClassifier' object has no attribute 'n_features_'

Open TKSJ2020 opened this issue 1 year ago • 1 comments

Hello,

I installed whokaryote with conda and I am trying to run using this: whokaryote.py --contigs /home/shishido/Lichen_data/Meta_omics2023/contigs/contigs_L10.fasta --outdir whokaryote_outputL10 --f --threads 10

But I am getting some error (below), could you please help me with what I should do?

Output directory is whokaryote_outputL10 Size-filtered contigs already exist. Using those. Tiara prediction file already present. Running prodigal... Prodigal gene prediction successful. Saving gene coordinate file... Gene coordinate file saved. Gene prediction took 348.8451623916626 seconds. Calculating gene structure features with gene predictions... File extension: GFF Calculating features successful. Calculating gene structure features took 1.6910111904144287 seconds. Predicting contig class... Using model with tiara predictions to predict contig class... Traceback (most recent call last): File "/home/shishido/anaconda3/envs/whokaryote/bin/whokaryote.py", line 104, in predict_class(feature_path, args.outdir, args.model) File "/home/shishido/anaconda3/envs/whokaryote/lib/python3.8/site-packages/whokaryote_scripts/predict_class.py", line 90, in predict_class predictions = loaded_rf.predict(features) File "/home/shishido/anaconda3/lib/python3.8/site-packages/sklearn/ensemble/_forest.py", line 612, in predict proba = self.predict_proba(X) File "/home/shishido/anaconda3/lib/python3.8/site-packages/sklearn/ensemble/_forest.py", line 656, in predict_proba X = self._validate_X_predict(X) File "/home/shishido/anaconda3/lib/python3.8/site-packages/sklearn/ensemble/_forest.py", line 412, in validate_X_predict return self.estimators[0]._validate_X_predict(X, check_input=True) File "/home/shishido/anaconda3/lib/python3.8/site-packages/sklearn/tree/classes.py", line 387, in validate_X_predict if self.n_features != n_features: AttributeError: 'DecisionTreeClassifier' object has no attribute 'n_features'

TKSJ2020 avatar Jun 20 '23 11:06 TKSJ2020