Icon

How to Build a Naive Bayes Model

<p><strong>How to Build a Naive Bayes Model</strong></p><p>This workflow shows how to build a simple Naive Bayes model. The workflow prepares the Adult dataset for machine learning by handling class imbalance (down-sampling to the minority class), and imputing missing values. The data is then split into training and testing sets, and a Naive Bayes model is trained to predict income and applied to the test data. Finally, the predictions are evaluated to measure how accurately the model classifies the income of an adult person.</p>

How to Build a Naive Bayes Model


This workflow shows how to build a simple Naive Bayes model. The workflow prepares the Adult dataset for machine learning by handling class imbalance (down-sampling to the minority class), and imputing missing values. The data is then split into training and testing sets, and a Naive Bayes model is trained to predict income and applied to the test data. Finally, the predictions are evaluated to measure how accurately the model classifies the income of an adult person.

Data Access

Data Preprocessing and Partitioning

Model Training and Testing

Model Evaluation

Filter outsparse columns
Column Filter
Naive Bayes Learner
Naive Bayes Predictor
Down-sampleto minority class
Equal Size Sampling
Imputemissing values
Expression
Evaluatingclassification model
Scorer
Adult dataset
Example Data Reader
Training 80%Testing 20%
Table Partitioner
Identifymissing values
Column Auto Type Cast

Nodes

Extensions

Links