SV2 icon indicating copy to clipboard operation
SV2 copied to clipboard

NotFittedError: This MultinomialNB instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator.

Open aulaelf opened this issue 2 years ago • 1 comments

After picking the model, when I try to use it, I am getting error - Traceback: File "/usr/local/Caskroom/miniforge/base/lib/python3.10/site-packages/streamlit/scriptrunner/script_runner.py", line 443, in _run_script exec(code, module.dict) File "/Users/mac/spamclassifier/spam-classifier0/app.py", line 49, in result = model.predict(vector_input)[0] File "/usr/local/Caskroom/miniforge/base/lib/python3.10/site-packages/sklearn/naive_bayes.py", line 79, in predict check_is_fitted(self) File "/usr/local/Caskroom/miniforge/base/lib/python3.10/site-packages/sklearn/utils/validation.py", line 1345, in check_is_fitted raise NotFittedError(msg % {"name": type(estimator).name})

aulaelf avatar Jun 12 '22 00:06 aulaelf