Naive Bayes (ML_CN_5)
This function uses the Bayes' theorem to calculate the probability of each class based on the frequency of the features in the training data, and classifies new input data based on highest probability
Naive Bayes is a probabilistic machine learning algorithm that uses Bayes' theorem to make predictions. It assumes that the features are independent of each other and calculates the probability of each class based on the frequency of the features in the training data.
Once the probabilities of each class are calculated, new input data is classified based on the class with the highest probability.
Sample Request
Build a Naive Bayes model named, "ClassicModel"
Building a Naive Bayes model
Naive Bayes
POST
https://autogon.ai/api/v1/engine/start
Request Body
project_id*
int
The id
of the current project
block_id*
int
The id
of the current block
function_code*
string
The function code for current block
parent_id*
int
The id
of the previous block
args*
object
Block arguments
model_name*
String
Name of the model to be used for prediction.
type
String
variant of the Naive Bayes classifier to use (categorical
, bernoulli
, categorical
, complement
). Defaults to gaussian
.
Sample Request
Make predictions with the pre-built model passing an optional test data.
Predicting with Naïve Bayes
Naive Bayes Predict
POST
https://autogon.ai/api/v1/engine/start
Request Body
model_name*
String
Name of previously trained model to be used for prediction
test_data
String
Input data for prediction. Defaults to x_train_url
in StateManagment
project_id*
int
ID of the current project
block_id*
int
ID of the current block
parent_id*
int
ID of the previous block
function_code*
String
Function code for the current block
Sample Request
Evaluate model metrics
Naive Bayes Metrics
POST
https://autogon.ai/api/v1/engine/start
Request Body
project_id*
int
ID of the current project
parent_id*
int
ID of the previous block
block_id*
int
ID of the current block
function_code*
String
Function code for the current block
model_name*
String
Name of the pre-trained model to be used for evaluation
Last updated