Naive Bayes (NB) Classifier

버전 1.1.7 (3.17 KB) 작성자: David Ferreira
Multi-class Classification with the NB
다운로드 수: 527
업데이트 날짜: 2020/11/10

Function
1. NaiveBayes.predict(_)
2. NaiveBayes.find(_)

Description
1. Returns the estimated labels of one or multiple test instances and the accuracy of the estimates.
2. Returns the labels with their respective probabilities in descending order.

Examples using Iris Data Set

load fisheriris

X = meas;
Y = species;
Xnew = [min(X);mean(X);max(X)];

mdl = NaiveBayes('gaussian');
mdl = mdl.fit(X,Y)
Ypred = mdl.predict(Xnew)

Ypred =

'setosa'
'versicolor'
'virginica'


Ynew = {'versicolor';'versicolor';'virginica'};
accuracy = accuracy_score(Ypred,Ynew)

accuracy =

0.6667

See more examples described in the script files.

인용 양식

David Ferreira (2024). Naive Bayes (NB) Classifier (https://github.com/ferreirad08/NaiveBayesClassifier/releases/tag/1.1.7), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2016a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.7

See release notes for this release on GitHub: https://github.com/ferreirad08/NaiveBayesClassifier/releases/tag/1.1.7

1.1.6

See release notes for this release on GitHub: https://github.com/ferreirad08/NaiveBayesClassifier/releases/tag/1.1.6

1.1.5

See release notes for this release on GitHub: https://github.com/ferreirad08/Gaussian-Naive-Bayes-GNB-Classifier/releases/tag/1.1.5

1.1.3

See release notes for this release on GitHub: https://github.com/ferreirad08/Gaussian-Naive-Bayes-GNB-Classifier/releases/tag/1.1.3

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.