Esta página aún no se ha traducido para esta versión. Puede ver la versión más reciente de esta página en inglés.

Bayes ingenuo

Modelo de Bayes Ingenuo con predictores de Gauss, multinomiales o kernel

Los modelos de Bayes ingenuos asumen que las observaciones tienen alguna distribución multivariante dada la membresía de clase, pero el predictor o las características que componen la observación son independientes. Este marco puede acomodar un conjunto de características completo de tal manera que una observación es un conjunto de conteos multinomiales.

Para entrenar un modelo de Bayes ingenuo, utilice fitcnb en la interfaz de línea de comandos. Después del entrenamiento, predecir las etiquetas o estimar las probabilidades posteriores pasando el modelo y los Datos predictores a predict.

Funciones

expandir todo

fitcnbTrain multiclass naive Bayes model
compactCompact naive Bayes classifier
crossvalCross-validated naive Bayes classifier
kfoldEdgeClassification edge for observations not used for training
kfoldLossClassification loss for observations not used for training
kfoldfunCross validate function
kfoldMarginClassification margins for observations not used for training
kfoldPredictPredict response for observations not used for training
lossClassification error for naive Bayes classifier
resubLossClassification loss for naive Bayes classifiers by resubstitution
logPLog unconditional probability density for naive Bayes classifier
compareHoldout
edgeClassification edge for naive Bayes classifiers
marginClassification margins for naive Bayes classifiers
resubEdgeClassification edge for naive Bayes classifiers by resubstitution
resubMarginClassification margins for naive Bayes classifiers by resubstitution
predictPredict labels using naive Bayes classification model
resubPredictPredict naive Bayes classifier resubstitution response

Clases

ClassificationNaiveBayesNaive Bayes classification
CompactClassificationNaiveBayesCompact naive Bayes classifier
ClassificationPartitionedModelCross-validated classification model

Temas

Supervised Learning Workflow and Algorithms

Understand the steps for supervised learning and the characteristics of nonparametric classification and regression functions.

Parametric Classification

Categorical response data

Naive Bayes Classification

The naive Bayes classifier is designed for use when predictors are independent of one another within each class, but it appears to work well in practice even when that independence assumption is not valid.

Plot Posterior Classification Probabilities

This example shows how to visualize classification probabilities for the Naive Bayes classification algorithm.

Classification

This example shows how to perform classification using discriminant analysis, naive Bayes classifiers, and decision trees.

Visualize Decision Surfaces of Different Classifiers

This example shows how to visualize the decision surface for different classification algorithms.