This AI model advises a buyer on the condition of a car based on several categorical features. This project can be extended to include additional features, such as scanning an engine to determine its duration, making it useful for every Mosotho buying a vehicle from dealers.
Car Adviser AI Model
Overview
This AI model advises a buyer on the condition of a car based on several categorical features. It uses three types of Naive Bayes classifiers: CategoricalNB, GaussianNB, and MixedNB, to predict the state of the car. This project can be extended to include additional features, such as scanning an engine to determine its duration, making it useful for every Mosotho buying a vehicle from dealers.
Features
CategoricalNB: Handles categorical features.
GaussianNB: Handles continuous features.
MixedNB: Handles a mix of categorical and continuous features.
Interactive Input: Allows users to input car features and get a prediction on the car's condition.
Accuracy Reporting: Provides accuracy of each classifier on test data.
Requirements
Python 3.x
pandas
scikit-learn
mixed-naive-bayes
Installation
Step-by-Step Installation
1. Clone the Repository
sh
git clone
github.com
cd car-adviser-ai
2. Create a Virtual Environment
It's a good practice to create a virtual environment to manage dependencies.
sh
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
3. Install Required Packages
sh
pip install pandas scikit-learn mixed-naive-bayes
4. The dataset is called car.data
Ensure you have the above dataset for training and testing the model.
5. Run the Model
Execute the Python script to train the classifiers and make predictions.
sh
python car_adviser.py
Installation on Specific Operating Systems
On Linux
Install Python and Pip:
sh
sudo apt update
sudo apt install python3 python3-pip
Follow the general installation steps above from cloning the repository to running the model.
On Windows
Install Python:
Download and install Python from the official website.
Follow the general installation steps above from cloning the repository to running the model.
On macOS
Install Homebrew (i …