Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

sklearn metrics for multiclass classification

Asked by Arjun Arora May 22, 2021 1.6K views 1 answer
Share

About this question

 I have performed GaussianNB classification using a sklearn. I tried to calculate the metrics using the following code:

print accuracy_score(y_test, y_pred)
print precision_score(y_test, y_pred)

Accuracy score is working correctly but the precision score calculation is showing error as:

ValueError: Target is multiclass but average='binary'. Please choose another average setting.

As the target is multiclass, can I have the metric scores of precision, recall, etc.?

Top keyword - target is multiclass but average='binary'. please choose another average setting.

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.