Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

朴素贝叶斯

具有高斯预测变量、多项预测变量或核预测变量的朴素贝叶斯模型

朴素贝叶斯模型假设在给定类成员关系的情况下,观测值具有某种多元分布,但构成观测值的预测变量或特征是彼此独立的。此框架可以容纳完整的特征集,这样一个观测值即为一个多项计数集。

要训练朴素贝叶斯模型,可以在命令行界面中使用 fitcnb。训练模型后,可将模型和预测变量数据传递给 predict,以预测标签或估计后验概率。

App

分类学习器使用有监督的机器学习训练模型以对数据进行分类

模块

ClassificationNaiveBayes PredictClassify observations using naive Bayes model (自 R2023b 起)

函数

全部展开

fitcnbTrain multiclass naive Bayes model
compactReduce size of machine learning model
limeLocal interpretable model-agnostic explanations (LIME) (自 R2020b 起)
partialDependenceCompute partial dependence (自 R2020b 起)
permutationImportancePredictor importance by permutation (自 R2024a 起)
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
shapleyShapley values (自 R2021a 起)
crossvalCross-validate machine learning model
kfoldEdgeClassification edge for cross-validated classification model
kfoldLossClassification loss for cross-validated classification model
kfoldfunCross-validate function for classification
kfoldMarginClassification margins for cross-validated classification model
kfoldPredictClassify observations in cross-validated classification model
lossClassification loss for naive Bayes classifier
resubLossResubstitution classification loss
logpLog unconditional probability density for naive Bayes classifier
compareHoldoutCompare accuracies of two classification models using new data
edgeClassification edge for naive Bayes classifier
marginClassification margins for naive Bayes classifier
resubEdgeResubstitution classification edge
resubMarginResubstitution classification margin
testckfoldCompare accuracies of two classification models by repeated cross-validation
predictClassify observations using naive Bayes classifier
resubPredictClassify training data using trained classifier
incrementalLearnerConvert naive Bayes classification model to incremental learner (自 R2021a 起)

对象

ClassificationPartitionedModelCross-validated classification model

ClassificationNaiveBayesNaive Bayes classification for multiclass classification
CompactClassificationNaiveBayesCompact naive Bayes classifier for multiclass classification

主题